epoc32/include/stdapis/boost/range/detail/sfinae.hpp
branchSymbian2
changeset 2 2fe1408b6811
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/epoc32/include/stdapis/boost/range/detail/sfinae.hpp	Tue Mar 16 16:12:26 2010 +0000
     1.3 @@ -0,0 +1,77 @@
     1.4 +// Boost.Range library
     1.5 +//
     1.6 +//  Copyright Thorsten Ottosen 2003-2004. Use, modification and
     1.7 +//  distribution is subject to the Boost Software License, Version
     1.8 +//  1.0. (See accompanying file LICENSE_1_0.txt or copy at
     1.9 +//  http://www.boost.org/LICENSE_1_0.txt)
    1.10 +//
    1.11 +// For more information, see http://www.boost.org/libs/range/
    1.12 +//
    1.13 +
    1.14 +#ifndef BOOST_RANGE_DETAIL_SFINAE_HPP
    1.15 +#define BOOST_RANGE_DETAIL_SFINAE_HPP
    1.16 +
    1.17 +#include <boost/range/config.hpp>
    1.18 +#include <boost/type_traits/is_array.hpp>
    1.19 +#include <boost/type_traits/detail/yes_no_type.hpp>
    1.20 +#include <utility>
    1.21 +
    1.22 +
    1.23 +namespace boost 
    1.24 +{
    1.25 +    namespace range_detail
    1.26 +    {          
    1.27 +        using type_traits::yes_type;
    1.28 +        using type_traits::no_type;
    1.29 +
    1.30 +        //////////////////////////////////////////////////////////////////////
    1.31 +        // string
    1.32 +        //////////////////////////////////////////////////////////////////////
    1.33 +        
    1.34 +        yes_type is_string_impl( const char* const );
    1.35 +        yes_type is_string_impl( const wchar_t* const );
    1.36 +        no_type  is_string_impl( ... );
    1.37 +        
    1.38 +        template< std::size_t sz >
    1.39 +        yes_type is_char_array_impl( char BOOST_RANGE_ARRAY_REF()[sz] );
    1.40 +        template< std::size_t sz >
    1.41 +        yes_type is_char_array_impl( const char BOOST_RANGE_ARRAY_REF()[sz] );
    1.42 +        no_type  is_char_array_impl( ... );
    1.43 +        
    1.44 +        template< std::size_t sz >
    1.45 +        yes_type is_wchar_t_array_impl( wchar_t BOOST_RANGE_ARRAY_REF()[sz] );
    1.46 +        template< std::size_t sz >
    1.47 +        yes_type is_wchar_t_array_impl( const wchar_t BOOST_RANGE_ARRAY_REF()[sz] );
    1.48 +        no_type  is_wchar_t_array_impl( ... );
    1.49 +                                     
    1.50 +        yes_type is_char_ptr_impl( char* const );
    1.51 +        no_type  is_char_ptr_impl( ... );
    1.52 +        
    1.53 +        yes_type is_const_char_ptr_impl( const char* const );
    1.54 +        no_type  is_const_char_ptr_impl( ... );
    1.55 +
    1.56 +        yes_type is_wchar_t_ptr_impl( wchar_t* const );
    1.57 +        no_type  is_wchar_t_ptr_impl( ... );
    1.58 +        
    1.59 +        yes_type is_const_wchar_t_ptr_impl( const wchar_t* const );
    1.60 +        no_type  is_const_wchar_t_ptr_impl( ... );
    1.61 +        
    1.62 +        //////////////////////////////////////////////////////////////////////
    1.63 +        // pair
    1.64 +        //////////////////////////////////////////////////////////////////////
    1.65 +
    1.66 +        template< typename Iterator >
    1.67 +        yes_type is_pair_impl( const std::pair<Iterator,Iterator>* );
    1.68 +        no_type  is_pair_impl( ... );
    1.69 +
    1.70 +        //////////////////////////////////////////////////////////////////////
    1.71 +        // tags
    1.72 +        //////////////////////////////////////////////////////////////////////
    1.73 +
    1.74 +        struct char_or_wchar_t_array_tag {};
    1.75 +        
    1.76 +    } // namespace 'range_detail'
    1.77 +    
    1.78 +} // namespace 'boost'
    1.79 +
    1.80 +#endif