]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/boost/typeof/pointers_data_members.hpp
import new upstream nautilus stable release 14.2.8
[ceph.git] / ceph / src / boost / boost / typeof / pointers_data_members.hpp
CommitLineData
7c673cae
FG
1// Copyright (C) 2004 Arkadiy Vertleyb
2// Use, modification and distribution is subject to the Boost Software
3// License, Version 1.0. (http://www.boost.org/LICENSE_1_0.txt)
4
5#ifndef BOOST_TYPEOF_POINTERS_DATA_MEMBERS_HPP_INCLUDED
6#define BOOST_TYPEOF_POINTERS_DATA_MEMBERS_HPP_INCLUDED
7
8#include <boost/typeof/encode_decode_params.hpp>
9#include <boost/typeof/encode_decode.hpp>
10
11#include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP()
12
13BOOST_TYPEOF_BEGIN_ENCODE_NS
14
15enum {PTR_DATA_MEM_ID = BOOST_TYPEOF_UNIQUE_ID()};
16
17template<class V, class P0, class P1>
18struct encode_type_impl<V, P0 P1::*>
19{
20 typedef BOOST_TYPEOF_ENCODE_PARAMS(2, PTR_DATA_MEM_ID) type;
21};
22
23template<class Iter>
92f5a8d4 24struct decode_type_impl<boost::type_of::constant<std::size_t,PTR_DATA_MEM_ID>, Iter>
7c673cae
FG
25{
26 typedef Iter iter0;
27 BOOST_TYPEOF_DECODE_PARAMS(2)
28
29 template<class T> struct workaround{
30 typedef p0 T::* type;
31 };
92f5a8d4 32 typedef typename decode_type_impl<boost::type_of::constant<std::size_t,PTR_DATA_MEM_ID>, Iter>::template workaround<p1>::type type;
7c673cae
FG
33 typedef iter2 iter;
34};
35
36BOOST_TYPEOF_END_ENCODE_NS
37
38#endif//BOOST_TYPEOF_POINTERS_DATA_MEMBERS_HPP_INCLUDED