Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:39:13

0001 // Copyright Kevlin Henney, 2000-2005.
0002 // Copyright Alexander Nasonov, 2006-2010.
0003 // Copyright Antony Polukhin, 2011-2023.
0004 //
0005 // Distributed under the Boost Software License, Version 1.0. (See
0006 // accompanying file LICENSE_1_0.txt or copy at
0007 // http://www.boost.org/LICENSE_1_0.txt)
0008 //
0009 // what:  lexical_cast custom keyword cast
0010 // who:   contributed by Kevlin Henney,
0011 //        enhanced with contributions from Terje Slettebo,
0012 //        with additional fixes and suggestions from Gennaro Prota,
0013 //        Beman Dawes, Dave Abrahams, Daryle Walker, Peter Dimov,
0014 //        Alexander Nasonov, Antony Polukhin, Justin Viiret, Michael Hofmann,
0015 //        Cheng Yang, Matthew Bradbury, David W. Birdsall, Pavel Korzh and other Boosters
0016 // when:  November 2000, March 2003, June 2005, June 2006, March 2011 - 2014
0017 
0018 #ifndef BOOST_LEXICAL_CAST_DETAIL_IS_CHARACTER_HPP
0019 #define BOOST_LEXICAL_CAST_DETAIL_IS_CHARACTER_HPP
0020 
0021 #include <boost/config.hpp>
0022 #ifdef BOOST_HAS_PRAGMA_ONCE
0023 #   pragma once
0024 #endif
0025 
0026 #include <boost/type_traits/integral_constant.hpp>
0027 #include <boost/type_traits/is_same.hpp>
0028 
0029 namespace boost {
0030 
0031     namespace detail // is_character<...>
0032     {
0033         // returns true, if T is one of the character types
0034         template < typename T >
0035         struct is_character
0036         {
0037             typedef typename boost::integral_constant<
0038                 bool,
0039                 boost::is_same< T, char >::value ||
0040                     #if !defined(BOOST_NO_STRINGSTREAM) && !defined(BOOST_NO_STD_WSTRING)
0041                         boost::is_same< T, wchar_t >::value ||
0042                     #endif
0043                     #ifndef BOOST_NO_CXX11_CHAR16_T
0044                         boost::is_same< T, char16_t >::value ||
0045                     #endif
0046                     #ifndef BOOST_NO_CXX11_CHAR32_T
0047                         boost::is_same< T, char32_t >::value ||
0048                     #endif
0049                         boost::is_same< T, unsigned char >::value ||
0050                         boost::is_same< T, signed char >::value
0051             > type;
0052 
0053             BOOST_STATIC_CONSTANT(bool, value = (type::value) );
0054         };
0055     }
0056 }
0057 
0058 #endif // BOOST_LEXICAL_CAST_DETAIL_IS_CHARACTER_HPP
0059