1 | |
2 | // (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, |
3 | // Howard Hinnant and John Maddock 2000. |
4 | // (C) Copyright Mat Marcus, Jesse Jones and Adobe Systems Inc 2001 |
5 | |
6 | // Use, modification and distribution are subject to the Boost Software License, |
7 | // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at |
8 | // http://www.boost.org/LICENSE_1_0.txt). |
9 | // |
10 | // See http://www.boost.org/libs/type_traits for most recent version including documentation. |
11 | |
12 | // Fixed is_pointer, is_lvalue_reference, is_const, is_volatile, is_same, |
13 | // is_member_pointer based on the Simulated Partial Specialization work |
14 | // of Mat Marcus and Jesse Jones. See http://opensource.adobe.com or |
15 | // http://groups.yahoo.com/group/boost/message/5441 |
16 | // Some workarounds in here use ideas suggested from "Generic<Programming>: |
17 | // Mappings between Types and Values" |
18 | // by Andrei Alexandrescu (see http://www.cuj.com/experts/1810/alexandr.html). |
19 | |
20 | |
21 | #ifndef BOOST_TT_IS_LVALUE_REFERENCE_HPP_INCLUDED |
22 | #define BOOST_TT_IS_LVALUE_REFERENCE_HPP_INCLUDED |
23 | |
24 | #include <boost/type_traits/config.hpp> |
25 | |
26 | |
27 | // should be the last #include |
28 | #include <boost/type_traits/detail/bool_trait_def.hpp> |
29 | |
30 | namespace boost { |
31 | |
32 | #if defined( __CODEGEARC__ ) |
33 | BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_lvalue_reference,T,__is_reference(T)) |
34 | #else |
35 | |
36 | BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_lvalue_reference,T,false) |
37 | BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_lvalue_reference,T&,true) |
38 | |
39 | #if defined(BOOST_ILLEGAL_CV_REFERENCES) |
40 | // these are illegal specialisations; cv-qualifies applied to |
41 | // references have no effect according to [8.3.2p1], |
42 | // C++ Builder requires them though as it treats cv-qualified |
43 | // references as distinct types... |
44 | BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_lvalue_reference,T& const,true) |
45 | BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_lvalue_reference,T& volatile,true) |
46 | BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_lvalue_reference,T& const volatile,true) |
47 | #endif |
48 | |
49 | #endif |
50 | |
51 | } // namespace boost |
52 | |
53 | #include <boost/type_traits/detail/bool_trait_undef.hpp> |
54 | |
55 | #endif // BOOST_TT_IS_REFERENCE_HPP_INCLUDED |
56 | |
57 | |