2 * Copyright Andrey Semashev 2007 - 2015.
3 * Distributed under the Boost Software License, Version 1.0.
4 * (See accompanying file LICENSE_1_0.txt or copy at
5 * http://www.boost.org/LICENSE_1_0.txt)
8 * \file deduce_char_type.hpp
9 * \author Andrey Semashev
12 * \brief This header is the Boost.Log library implementation, see the library documentation
13 * at http://www.boost.org/doc/libs/release/libs/log/doc/html/index.html.
16 #ifndef BOOST_LOG_DETAIL_DEDUCE_CHAR_TYPE_HPP_INCLUDED_
17 #define BOOST_LOG_DETAIL_DEDUCE_CHAR_TYPE_HPP_INCLUDED_
19 #include <boost/log/detail/config.hpp>
20 #include <boost/log/detail/header.hpp>
22 #ifdef BOOST_HAS_PRAGMA_ONCE
28 BOOST_LOG_OPEN_NAMESPACE
32 template< typename T >
33 struct deduced_char_type;
36 struct deduced_char_type< char >
42 struct deduced_char_type< const char >
48 struct deduced_char_type< wchar_t >
54 struct deduced_char_type< const wchar_t >
59 //! Auxiliary traits to detect character type from a string
60 template< typename RangeT >
61 struct deduce_char_type :
62 public deduced_char_type< typename RangeT::value_type >
66 template< typename T >
67 struct deduce_char_type< T* > :
68 public deduced_char_type< T >
72 template< typename T >
73 struct deduce_char_type< T* const > :
74 public deduced_char_type< T >
78 template< typename T, unsigned int CountV >
79 struct deduce_char_type< T[CountV] > :
80 public deduced_char_type< T >
84 template< typename T >
85 struct deduce_char_type< T& > :
86 public deduce_char_type< T >
90 #if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
92 template< typename T >
93 struct deduce_char_type< T&& > :
94 public deduce_char_type< T >
102 BOOST_LOG_CLOSE_NAMESPACE // namespace log
106 #include <boost/log/detail/footer.hpp>
108 #endif // BOOST_LOG_DETAIL_DEDUCE_CHAR_TYPE_HPP_INCLUDED_