]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/boost/typeof/encode_decode.hpp
import new upstream nautilus stable release 14.2.8
[ceph.git] / ceph / src / boost / boost / typeof / encode_decode.hpp
1 // Copyright (C) 2004 Arkadiy Vertleyb
2
3 // Distributed under the Boost Software License, Version 1.0. (See accompanying
4 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
5
6 // boostinspect:nounnamed
7
8 #ifndef BOOST_TYPEOF_ENCODE_DECODE_HPP_INCLUDED
9 #define BOOST_TYPEOF_ENCODE_DECODE_HPP_INCLUDED
10
11 #ifndef BOOST_TYPEOF_SUPPRESS_UNNAMED_NAMESPACE
12
13 # define BOOST_TYPEOF_BEGIN_ENCODE_NS namespace { namespace boost_typeof {
14 # define BOOST_TYPEOF_END_ENCODE_NS }}
15 # define BOOST_TYPEOF_ENCODE_NS_QUALIFIER boost_typeof
16
17 #else
18
19 # define BOOST_TYPEOF_BEGIN_ENCODE_NS namespace boost { namespace type_of {
20 # define BOOST_TYPEOF_END_ENCODE_NS }}
21 # define BOOST_TYPEOF_ENCODE_NS_QUALIFIER boost::type_of
22
23 # define BOOST_TYPEOF_TEXT "unnamed namespace is off"
24 # include <boost/typeof/message.hpp>
25
26 #endif
27
28 BOOST_TYPEOF_BEGIN_ENCODE_NS
29
30 template<class V, class Type_Not_Registered_With_Typeof_System>
31 struct encode_type_impl;
32
33 template<class T, class Iter>
34 struct decode_type_impl
35 {
36 typedef int type; // MSVC ETI workaround
37 };
38
39 template<class T>
40 struct decode_nested_template_helper_impl;
41
42 BOOST_TYPEOF_END_ENCODE_NS
43
44 namespace boost { namespace type_of {
45
46 template<class V, class T>
47 struct encode_type : BOOST_TYPEOF_ENCODE_NS_QUALIFIER::encode_type_impl<V, T>
48 {};
49
50 template<class Iter>
51 struct decode_type : BOOST_TYPEOF_ENCODE_NS_QUALIFIER::decode_type_impl<
52 typename Iter::type,
53 typename Iter::next
54 >
55 {};
56 }}
57
58 #endif//BOOST_TYPEOF_ENCODE_DECODE_HPP_INCLUDED