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 | // Some fixes for is_array are based on a newsgroup posting by Jonathan Lundquist. |
12 | |
13 | |
14 | #ifndef BOOST_TT_IS_ARRAY_HPP_INCLUDED |
15 | #define BOOST_TT_IS_ARRAY_HPP_INCLUDED |
16 | |
17 | #include <boost/type_traits/config.hpp> |
18 | |
19 | |
20 | #include <cstddef> |
21 | |
22 | // should be the last #include |
23 | #include <boost/type_traits/detail/bool_trait_def.hpp> |
24 | |
25 | namespace boost { |
26 | |
27 | #if defined( __CODEGEARC__ ) |
28 | BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_array,T,__is_array(T)) |
29 | #else |
30 | BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_array,T,false) |
31 | #if !defined(BOOST_NO_ARRAY_TYPE_SPECIALIZATIONS) |
32 | BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_2(typename T,std::size_t N,is_array,T[N],true) |
33 | BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_2(typename T,std::size_t N,is_array,T const[N],true) |
34 | BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_2(typename T,std::size_t N,is_array,T volatile[N],true) |
35 | BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_2(typename T,std::size_t N,is_array,T const volatile[N],true) |
36 | #if !BOOST_WORKAROUND(__BORLANDC__, < 0x600) && !defined(__IBMCPP__) && !BOOST_WORKAROUND(__DMC__, BOOST_TESTED_AT(0x840)) |
37 | BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_array,T[],true) |
38 | BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_array,T const[],true) |
39 | BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_array,T volatile[],true) |
40 | BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_array,T const volatile[],true) |
41 | #endif |
42 | #endif |
43 | |
44 | #endif |
45 | |
46 | } // namespace boost |
47 | |
48 | #include <boost/type_traits/detail/bool_trait_undef.hpp> |
49 | |
50 | #endif // BOOST_TT_IS_ARRAY_HPP_INCLUDED |
51 | |