1 // Copyright (C) 2004 Arkadiy Vertleyb
2 // Distributed under the Boost Software License, Version 1.0. (See accompanying
3 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
5 #ifndef BOOST_TYPEOF_TYPE_ENCODING_HPP_INCLUDED
6 #define BOOST_TYPEOF_TYPE_ENCODING_HPP_INCLUDED
8 #define BOOST_TYPEOF_REGISTER_TYPE_IMPL(T, Id) \
10 template<class V> struct encode_type_impl<V, T > \
11 : boost::type_of::push_back<V, boost::mpl::size_t<Id> > \
13 template<class Iter> struct decode_type_impl<boost::mpl::size_t<Id>, Iter> \
19 #define BOOST_TYPEOF_REGISTER_TYPE_EXPLICIT_ID(Type, Id) \
20 BOOST_TYPEOF_BEGIN_ENCODE_NS \
21 BOOST_TYPEOF_REGISTER_TYPE_IMPL(Type, Id) \
22 BOOST_TYPEOF_END_ENCODE_NS
24 #define BOOST_TYPEOF_REGISTER_TYPE(Type) \
25 BOOST_TYPEOF_REGISTER_TYPE_EXPLICIT_ID(Type, BOOST_TYPEOF_UNIQUE_ID())
27 #endif//BOOST_TYPEOF_TYPE_ENCODING_HPP_INCLUDED