]> git.donarmstrong.com Git - rsem.git/blob - boost/type_traits/is_union.hpp
RSEM Source Codes
[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    BOOST_STATIC_CONSTANT(bool, value = BOOST_IS_UNION(cvt));
29 };
30 #else
31 //
32 // using remove_cv here generates a whole load of needless
33 // warnings with gcc, since it doesn't do any good with gcc
34 // in any case (at least at present), just remove it:
35 //
36 template <typename T> struct is_union_impl
37 {
38    BOOST_STATIC_CONSTANT(bool, value = BOOST_IS_UNION(T));
39 };
40 #endif
41 } // namespace detail
42
43 BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_union,T,::boost::detail::is_union_impl<T>::value)
44
45 } // namespace boost
46
47 #include <boost/type_traits/detail/bool_trait_undef.hpp>
48
49 #endif // BOOST_TT_IS_UNION_HPP_INCLUDED