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