Chris@16
|
1 // Boost.Range library
|
Chris@16
|
2 //
|
Chris@16
|
3 // Copyright Thorsten Ottosen 2003-2004. Use, modification and
|
Chris@16
|
4 // distribution is subject to the Boost Software License, Version
|
Chris@16
|
5 // 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
Chris@16
|
6 // http://www.boost.org/LICENSE_1_0.txt)
|
Chris@16
|
7 //
|
Chris@16
|
8 // For more information, see http://www.boost.org/libs/range/
|
Chris@16
|
9 //
|
Chris@16
|
10
|
Chris@16
|
11 #ifndef BOOST_RANGE_DETAIL_SFINAE_HPP
|
Chris@16
|
12 #define BOOST_RANGE_DETAIL_SFINAE_HPP
|
Chris@16
|
13
|
Chris@16
|
14 #include <boost/range/config.hpp>
|
Chris@16
|
15 #include <boost/type_traits/is_array.hpp>
|
Chris@16
|
16 #include <boost/type_traits/detail/yes_no_type.hpp>
|
Chris@16
|
17 #include <utility>
|
Chris@16
|
18
|
Chris@16
|
19
|
Chris@16
|
20 namespace boost
|
Chris@16
|
21 {
|
Chris@16
|
22 namespace range_detail
|
Chris@16
|
23 {
|
Chris@16
|
24 using type_traits::yes_type;
|
Chris@16
|
25 using type_traits::no_type;
|
Chris@16
|
26
|
Chris@16
|
27 //////////////////////////////////////////////////////////////////////
|
Chris@16
|
28 // string
|
Chris@16
|
29 //////////////////////////////////////////////////////////////////////
|
Chris@16
|
30
|
Chris@16
|
31 yes_type is_string_impl( const char* const );
|
Chris@16
|
32 yes_type is_string_impl( const wchar_t* const );
|
Chris@16
|
33 no_type is_string_impl( ... );
|
Chris@16
|
34
|
Chris@16
|
35 template< std::size_t sz >
|
Chris@16
|
36 yes_type is_char_array_impl( char BOOST_RANGE_ARRAY_REF()[sz] );
|
Chris@16
|
37 template< std::size_t sz >
|
Chris@16
|
38 yes_type is_char_array_impl( const char BOOST_RANGE_ARRAY_REF()[sz] );
|
Chris@16
|
39 no_type is_char_array_impl( ... );
|
Chris@16
|
40
|
Chris@16
|
41 template< std::size_t sz >
|
Chris@16
|
42 yes_type is_wchar_t_array_impl( wchar_t BOOST_RANGE_ARRAY_REF()[sz] );
|
Chris@16
|
43 template< std::size_t sz >
|
Chris@16
|
44 yes_type is_wchar_t_array_impl( const wchar_t BOOST_RANGE_ARRAY_REF()[sz] );
|
Chris@16
|
45 no_type is_wchar_t_array_impl( ... );
|
Chris@16
|
46
|
Chris@16
|
47 yes_type is_char_ptr_impl( char* const );
|
Chris@16
|
48 no_type is_char_ptr_impl( ... );
|
Chris@16
|
49
|
Chris@16
|
50 yes_type is_const_char_ptr_impl( const char* const );
|
Chris@16
|
51 no_type is_const_char_ptr_impl( ... );
|
Chris@16
|
52
|
Chris@16
|
53 yes_type is_wchar_t_ptr_impl( wchar_t* const );
|
Chris@16
|
54 no_type is_wchar_t_ptr_impl( ... );
|
Chris@16
|
55
|
Chris@16
|
56 yes_type is_const_wchar_t_ptr_impl( const wchar_t* const );
|
Chris@16
|
57 no_type is_const_wchar_t_ptr_impl( ... );
|
Chris@16
|
58
|
Chris@16
|
59 //////////////////////////////////////////////////////////////////////
|
Chris@16
|
60 // pair
|
Chris@16
|
61 //////////////////////////////////////////////////////////////////////
|
Chris@16
|
62
|
Chris@16
|
63 template< typename Iterator >
|
Chris@16
|
64 yes_type is_pair_impl( const std::pair<Iterator,Iterator>* );
|
Chris@16
|
65 no_type is_pair_impl( ... );
|
Chris@16
|
66
|
Chris@16
|
67 //////////////////////////////////////////////////////////////////////
|
Chris@16
|
68 // tags
|
Chris@16
|
69 //////////////////////////////////////////////////////////////////////
|
Chris@16
|
70
|
Chris@16
|
71 struct char_or_wchar_t_array_tag {};
|
Chris@16
|
72
|
Chris@16
|
73 } // namespace 'range_detail'
|
Chris@16
|
74
|
Chris@16
|
75 } // namespace 'boost'
|
Chris@16
|
76
|
Chris@16
|
77 #endif
|