]> git.donarmstrong.com Git - rsem.git/blob - boost/type_traits/is_union.hpp
Updated boost to v1.55.0
[rsem.git] / boost / type_traits / is_union.hpp
1
2 //  (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, Howard
3 //  Hinnant & John Maddock 2000.  
4 //  Use, modification and distribution are subject to the Boost Software License,
5 //  Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
6 //  http://www.boost.org/LICENSE_1_0.txt).
7 //
8 //  See http://www.boost.org/libs/type_traits for most recent version including documentation.
9
10
11 #ifndef BOOST_TT_IS_UNION_HPP_INCLUDED
12 #define BOOST_TT_IS_UNION_HPP_INCLUDED
13
14 #include <boost/type_traits/remove_cv.hpp>
15 #include <boost/type_traits/config.hpp>
16 #include <boost/type_traits/intrinsics.hpp>
17
18 // should be the last #include
19 #include <boost/type_traits/detail/bool_trait_def.hpp>
20
21 namespace boost {
22
23 namespace detail {
24 #ifndef __GNUC__
25 template <typename T> struct is_union_impl
26 {
27    typedef typename remove_cv<T>::type cvt;
28 #ifdef BOOST_IS_UNION
29    BOOST_STATIC_CONSTANT(bool, value = BOOST_IS_UNION(cvt));
30 #else
31    BOOST_STATIC_CONSTANT(bool, value = false);
32 #endif
33 };
34 #else
35 //
36 // using remove_cv here generates a whole load of needless
37 // warnings with gcc, since it doesn't do any good with gcc
38 // in any case (at least at present), just remove it:
39 //
40 template <typename T> struct is_union_impl
41 {
42 #ifdef BOOST_IS_UNION
43    BOOST_STATIC_CONSTANT(bool, value = BOOST_IS_UNION(T));
44 #else
45    BOOST_STATIC_CONSTANT(bool, value = false);
46 #endif
47 };
48 #endif
49 } // namespace detail
50
51 BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_union,T,::boost::detail::is_union_impl<T>::value)
52
53 } // namespace boost
54
55 #include <boost/type_traits/detail/bool_trait_undef.hpp>
56
57 #endif // BOOST_TT_IS_UNION_HPP_INCLUDED