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 string_literal_fwd.hpp
9 * \author Andrey Semashev
12 * The header contains forward declaration of a constant string literal wrapper.
15 #ifndef BOOST_LOG_UTILITY_STRING_LITERAL_FWD_HPP_INCLUDED_
16 #define BOOST_LOG_UTILITY_STRING_LITERAL_FWD_HPP_INCLUDED_
19 #include <boost/log/detail/config.hpp>
21 #ifdef BOOST_HAS_PRAGMA_ONCE
27 BOOST_LOG_OPEN_NAMESPACE
30 * \brief String literal wrapper
32 * The \c basic_string_literal is a thin wrapper around a constant string literal.
33 * It provides interface similar to STL strings, but because of read-only nature
34 * of string literals, lacks ability to modify string contents. However,
35 * \c basic_string_literal objects can be assigned to and cleared.
37 * The main advantage of this class comparing to other string classes is that
38 * it doesn't dynamically allocate memory and therefore is fast, thin and exception safe.
40 template< typename CharT, typename TraitsT = std::char_traits< CharT > >
41 class basic_string_literal;
43 // Convenience typedefs
44 #ifdef BOOST_LOG_USE_CHAR
45 typedef basic_string_literal< char > string_literal; //!< String literal type for narrow characters
47 #ifdef BOOST_LOG_USE_WCHAR_T
48 typedef basic_string_literal< wchar_t > wstring_literal; //!< String literal type for wide characters
51 BOOST_LOG_CLOSE_NAMESPACE // namespace log
55 #endif // BOOST_LOG_UTILITY_STRING_LITERAL_FWD_HPP_INCLUDED_