Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:30:27

0001 // Copyright (c) 2009-2020 Vladimir Batov.
0002 // Use, modification and distribution are subject to the Boost Software License,
0003 // Version 1.0. See http://www.boost.org/LICENSE_1_0.txt.
0004 
0005 #ifndef BOOST_CONVERT_DETAIL_IS_STRING_HPP
0006 #define BOOST_CONVERT_DETAIL_IS_STRING_HPP
0007 
0008 #include <boost/convert/detail/range.hpp>
0009 
0010 namespace boost { namespace cnv
0011 {
0012     namespace detail
0013     {
0014         template<typename T, bool is_range_class> struct is_string : std::false_type {};
0015 
0016         template<typename T> struct is_string<T*, false>
0017         {
0018             static bool BOOST_CONSTEXPR_OR_CONST value = cnv::is_char<T>::value;
0019         };
0020         template <typename T, std::size_t N> struct is_string<T [N], false>
0021         {
0022             static bool BOOST_CONSTEXPR_OR_CONST value = cnv::is_char<T>::value;
0023         };
0024         template<typename T> struct is_string<T, /*is_range_class=*/true>
0025         {
0026             static bool BOOST_CONSTEXPR_OR_CONST value = cnv::is_char<typename T::value_type>::value;
0027         };
0028     }
0029     template<typename T>
0030     struct is_string : detail::is_string<
0031         typename std::remove_const<T>::type,
0032         std::is_class<T>::value && cnv::is_range<T>::value>
0033     {};
0034 }}
0035 
0036 #endif // BOOST_CONVERT_DETAIL_IS_STRING_HPP