sl@0: // Boost.Range library sl@0: // sl@0: // Copyright Thorsten Ottosen 2003-2004. Use, modification and sl@0: // distribution is subject to the Boost Software License, Version sl@0: // 1.0. (See accompanying file LICENSE_1_0.txt or copy at sl@0: // http://www.boost.org/LICENSE_1_0.txt) sl@0: // sl@0: // For more information, see http://www.boost.org/libs/range/ sl@0: // sl@0: sl@0: #ifndef BOOST_RANGE_DETAIL_SFINAE_HPP sl@0: #define BOOST_RANGE_DETAIL_SFINAE_HPP sl@0: sl@0: #include sl@0: #include sl@0: #include sl@0: #include sl@0: sl@0: sl@0: namespace boost sl@0: { sl@0: namespace range_detail sl@0: { sl@0: using type_traits::yes_type; sl@0: using type_traits::no_type; sl@0: sl@0: ////////////////////////////////////////////////////////////////////// sl@0: // string sl@0: ////////////////////////////////////////////////////////////////////// sl@0: sl@0: yes_type is_string_impl( const char* const ); sl@0: yes_type is_string_impl( const wchar_t* const ); sl@0: no_type is_string_impl( ... ); sl@0: sl@0: template< std::size_t sz > sl@0: yes_type is_char_array_impl( char BOOST_RANGE_ARRAY_REF()[sz] ); sl@0: template< std::size_t sz > sl@0: yes_type is_char_array_impl( const char BOOST_RANGE_ARRAY_REF()[sz] ); sl@0: no_type is_char_array_impl( ... ); sl@0: sl@0: template< std::size_t sz > sl@0: yes_type is_wchar_t_array_impl( wchar_t BOOST_RANGE_ARRAY_REF()[sz] ); sl@0: template< std::size_t sz > sl@0: yes_type is_wchar_t_array_impl( const wchar_t BOOST_RANGE_ARRAY_REF()[sz] ); sl@0: no_type is_wchar_t_array_impl( ... ); sl@0: sl@0: yes_type is_char_ptr_impl( char* const ); sl@0: no_type is_char_ptr_impl( ... ); sl@0: sl@0: yes_type is_const_char_ptr_impl( const char* const ); sl@0: no_type is_const_char_ptr_impl( ... ); sl@0: sl@0: yes_type is_wchar_t_ptr_impl( wchar_t* const ); sl@0: no_type is_wchar_t_ptr_impl( ... ); sl@0: sl@0: yes_type is_const_wchar_t_ptr_impl( const wchar_t* const ); sl@0: no_type is_const_wchar_t_ptr_impl( ... ); sl@0: sl@0: ////////////////////////////////////////////////////////////////////// sl@0: // pair sl@0: ////////////////////////////////////////////////////////////////////// sl@0: sl@0: template< typename Iterator > sl@0: yes_type is_pair_impl( const std::pair* ); sl@0: no_type is_pair_impl( ... ); sl@0: sl@0: ////////////////////////////////////////////////////////////////////// sl@0: // tags sl@0: ////////////////////////////////////////////////////////////////////// sl@0: sl@0: struct char_or_wchar_t_array_tag {}; sl@0: sl@0: } // namespace 'range_detail' sl@0: sl@0: } // namespace 'boost' sl@0: sl@0: #endif