Chris@16: /* Chris@101: * Copyright Andrey Semashev 2007 - 2015. Chris@16: * Distributed under the Boost Software License, Version 1.0. Chris@16: * (See accompanying file LICENSE_1_0.txt or copy at Chris@16: * http://www.boost.org/LICENSE_1_0.txt) Chris@16: */ Chris@16: /*! Chris@16: * \file string_literal_fwd.hpp Chris@16: * \author Andrey Semashev Chris@16: * \date 24.06.2007 Chris@16: * Chris@16: * The header contains forward declaration of a constant string literal wrapper. Chris@16: */ Chris@16: Chris@16: #ifndef BOOST_LOG_UTILITY_STRING_LITERAL_FWD_HPP_INCLUDED_ Chris@16: #define BOOST_LOG_UTILITY_STRING_LITERAL_FWD_HPP_INCLUDED_ Chris@16: Chris@16: #include Chris@16: #include Chris@16: Chris@16: #ifdef BOOST_HAS_PRAGMA_ONCE Chris@16: #pragma once Chris@16: #endif Chris@16: Chris@16: namespace boost { Chris@16: Chris@16: BOOST_LOG_OPEN_NAMESPACE Chris@16: Chris@16: /*! Chris@16: * \brief String literal wrapper Chris@16: * Chris@16: * The \c basic_string_literal is a thin wrapper around a constant string literal. Chris@16: * It provides interface similar to STL strings, but because of read-only nature Chris@16: * of string literals, lacks ability to modify string contents. However, Chris@16: * \c basic_string_literal objects can be assigned to and cleared. Chris@16: * Chris@16: * The main advantage of this class comparing to other string classes is that Chris@16: * it doesn't dynamically allocate memory and therefore is fast, thin and exception safe. Chris@16: */ Chris@16: template< typename CharT, typename TraitsT = std::char_traits< CharT > > Chris@16: class basic_string_literal; Chris@16: Chris@16: // Convenience typedefs Chris@16: #ifdef BOOST_LOG_USE_CHAR Chris@16: typedef basic_string_literal< char > string_literal; //!< String literal type for narrow characters Chris@16: #endif Chris@16: #ifdef BOOST_LOG_USE_WCHAR_T Chris@16: typedef basic_string_literal< wchar_t > wstring_literal; //!< String literal type for wide characters Chris@16: #endif Chris@16: Chris@16: BOOST_LOG_CLOSE_NAMESPACE // namespace log Chris@16: Chris@16: } // namespace boost Chris@16: Chris@16: #endif // BOOST_LOG_UTILITY_STRING_LITERAL_FWD_HPP_INCLUDED_