char.hpp 766 B

1234567891011121314151617181920212223
  1. // Copyright (c) 2009-2014 Vladimir Batov.
  2. // Use, modification and distribution are subject to the Boost Software License,
  3. // Version 1.0. See http://www.boost.org/LICENSE_1_0.txt.
  4. #ifndef BOOST_CONVERT_DETAIL_IS_CHAR_HPP
  5. #define BOOST_CONVERT_DETAIL_IS_CHAR_HPP
  6. #include <boost/mpl/bool.hpp>
  7. #include <boost/type_traits/remove_const.hpp>
  8. namespace boost { namespace cnv
  9. {
  10. namespace detail
  11. {
  12. template<typename T> struct is_char : mpl::false_ {};
  13. template<> struct is_char<char> : mpl:: true_ {};
  14. template<> struct is_char<wchar_t> : mpl:: true_ {};
  15. }
  16. template <typename T> struct is_char : detail::is_char<typename remove_const<T>::type> {};
  17. }}
  18. #endif // BOOST_CONVERT_DETAIL_IS_CHAR_HPP