author | Mike Kinghan <mikek@symbian.org> |
Tue, 13 Jul 2010 15:21:54 +0100 | |
changeset 24 | 936784880b21 |
parent 2 | 39c28ec933dd |
permissions | -rwxr-xr-x |
2
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
1 |
|
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
2 |
// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000. |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
3 |
// Use, modification and distribution are subject to the Boost Software License, |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
4 |
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
5 |
// http://www.boost.org/LICENSE_1_0.txt). |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
6 |
// |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
7 |
// See http://www.boost.org/libs/type_traits for most recent version including documentation. |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
8 |
|
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
9 |
#ifndef BOOST_TT_ADD_REFERENCE_HPP_INCLUDED |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
10 |
#define BOOST_TT_ADD_REFERENCE_HPP_INCLUDED |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
11 |
|
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
12 |
#include <boost/type_traits/is_reference.hpp> |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
13 |
#include <boost/detail/workaround.hpp> |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
14 |
#include <boost/config.hpp> |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
15 |
|
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
16 |
// should be the last #include |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
17 |
#include <boost/type_traits/detail/type_trait_def.hpp> |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
18 |
|
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
19 |
namespace boost { |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
20 |
|
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
21 |
namespace detail { |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
22 |
|
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
23 |
#if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) && defined(BOOST_MSVC6_MEMBER_TEMPLATES) |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
24 |
|
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
25 |
template <bool x> |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
26 |
struct reference_adder |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
27 |
{ |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
28 |
template <typename T> struct result_ |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
29 |
{ |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
30 |
typedef T& type; |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
31 |
}; |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
32 |
}; |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
33 |
|
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
34 |
template <> |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
35 |
struct reference_adder<true> |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
36 |
{ |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
37 |
template <typename T> struct result_ |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
38 |
{ |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
39 |
typedef T type; |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
40 |
}; |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
41 |
}; |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
42 |
|
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
43 |
template <typename T> |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
44 |
struct add_reference_impl |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
45 |
{ |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
46 |
typedef typename reference_adder< |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
47 |
::boost::is_reference<T>::value |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
48 |
>::template result_<T> result; |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
49 |
|
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
50 |
typedef typename result::type type; |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
51 |
}; |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
52 |
|
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
53 |
#else |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
54 |
|
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
55 |
template <typename T> |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
56 |
struct add_reference_impl |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
57 |
{ |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
58 |
typedef T& type; |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
59 |
}; |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
60 |
|
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
61 |
#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
62 |
BOOST_TT_AUX_TYPE_TRAIT_IMPL_PARTIAL_SPEC1_1(typename T,add_reference,T&,T&) |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
63 |
#endif |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
64 |
|
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
65 |
#endif |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
66 |
|
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
67 |
// these full specialisations are always required: |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
68 |
BOOST_TT_AUX_TYPE_TRAIT_IMPL_SPEC1(add_reference,void,void) |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
69 |
#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
70 |
BOOST_TT_AUX_TYPE_TRAIT_IMPL_SPEC1(add_reference,void const,void const) |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
71 |
BOOST_TT_AUX_TYPE_TRAIT_IMPL_SPEC1(add_reference,void volatile,void volatile) |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
72 |
BOOST_TT_AUX_TYPE_TRAIT_IMPL_SPEC1(add_reference,void const volatile,void const volatile) |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
73 |
#endif |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
74 |
|
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
75 |
} // namespace detail |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
76 |
|
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
77 |
BOOST_TT_AUX_TYPE_TRAIT_DEF1(add_reference,T,typename boost::detail::add_reference_impl<T>::type) |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
78 |
|
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
79 |
// agurt, 07/mar/03: workaround Borland's ill-formed sensitivity to an additional |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
80 |
// level of indirection, here |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
81 |
#if BOOST_WORKAROUND(__BORLANDC__, < 0x600) |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
82 |
BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1(typename T,add_reference,T&,T&) |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
83 |
#endif |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
84 |
|
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
85 |
} // namespace boost |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
86 |
|
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
87 |
#include <boost/type_traits/detail/type_trait_undef.hpp> |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
88 |
|
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
89 |
#endif // BOOST_TT_ADD_REFERENCE_HPP_INCLUDED |