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)
5 #ifndef BOOST_TYPEOF_POINTERS_DATA_MEMBERS_HPP_INCLUDED
6 #define BOOST_TYPEOF_POINTERS_DATA_MEMBERS_HPP_INCLUDED
8 #include <boost/typeof/encode_decode_params.hpp>
9 #include <boost/typeof/encode_decode.hpp>
11 #include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP()
13 BOOST_TYPEOF_BEGIN_ENCODE_NS
15 enum {PTR_DATA_MEM_ID = BOOST_TYPEOF_UNIQUE_ID()};
17 template<class V, class P0, class P1>
18 struct encode_type_impl<V, P0 P1::*>
20 typedef BOOST_TYPEOF_ENCODE_PARAMS(2, PTR_DATA_MEM_ID) type;
24 struct decode_type_impl<boost::mpl::size_t<PTR_DATA_MEM_ID>, Iter>
27 BOOST_TYPEOF_DECODE_PARAMS(2)
29 template<class T> struct workaround{
33 typedef typename workaround<p1>::type type;
37 BOOST_TYPEOF_END_ENCODE_NS
39 #endif//BOOST_TYPEOF_POINTERS_DATA_MEMBERS_HPP_INCLUDED