Add Boost.Test karmic valgrind suppressions
[senf.git] / boost / typeof / encode_decode.hpp
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)
4
5 // boostinspect:nounnamed
6
7 #ifndef BOOST_TYPEOF_ENCODE_DECODE_HPP_INCLUDED
8 #define BOOST_TYPEOF_ENCODE_DECODE_HPP_INCLUDED
9
10 #include <boost/mpl/deref.hpp>
11 #include <boost/mpl/next.hpp>
12
13 #ifndef BOOST_TYPEOF_SUPPRESS_UNNAMED_NAMESPACE
14
15 #   define BOOST_TYPEOF_BEGIN_ENCODE_NS namespace { namespace boost_typeof { 
16 #   define BOOST_TYPEOF_END_ENCODE_NS }}
17 #   define BOOST_TYPEOF_ENCODE_NS_QUALIFIER boost_typeof
18
19 #else
20
21 #   define BOOST_TYPEOF_BEGIN_ENCODE_NS namespace boost { namespace type_of { 
22 #   define BOOST_TYPEOF_END_ENCODE_NS }} 
23 #   define BOOST_TYPEOF_ENCODE_NS_QUALIFIER boost::type_of
24
25 #   define BOOST_TYPEOF_TEXT "unnamed namespace is off"
26 #   include <boost/typeof/message.hpp>
27
28 #endif
29
30 BOOST_TYPEOF_BEGIN_ENCODE_NS
31
32 template<class V, class Type_Not_Registered_With_Typeof_System> 
33 struct encode_type_impl;
34
35 template<class T, class Iter> 
36 struct decode_type_impl
37 {
38     typedef int type;  // MSVC ETI workaround
39 };
40
41 BOOST_TYPEOF_END_ENCODE_NS
42
43 namespace boost { namespace type_of {
44
45     template<class V, class T> 
46     struct encode_type : BOOST_TYPEOF_ENCODE_NS_QUALIFIER::encode_type_impl<V, T>
47     {};
48
49     template<class Iter> 
50     struct decode_type : BOOST_TYPEOF_ENCODE_NS_QUALIFIER::decode_type_impl<
51         typename Iter::type,
52         typename Iter::next
53     >
54     {};
55 }}
56
57 #endif//BOOST_TYPEOF_ENCODE_DECODE_HPP_INCLUDED