// Copyright Kevlin Henney, 2000-2005. // Copyright Alexander Nasonov, 2006-2010. // Copyright Antony Polukhin, 2011-2024. // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_LEXICAL_CAST_DETAIL_CONVERTER_LEXICAL_BASIC_UNLOCKEDBUF_HPP #define BOOST_LEXICAL_CAST_DETAIL_CONVERTER_LEXICAL_BASIC_UNLOCKEDBUF_HPP #include #ifdef BOOST_HAS_PRAGMA_ONCE # pragma once #endif #ifdef BOOST_NO_STRINGSTREAM #include #else #include #endif #include #ifndef BOOST_NO_CWCHAR # include #endif namespace boost { namespace detail { namespace lcast { // acts as a stream buffer which wraps around a pair of pointers // and gives acces to internals template class basic_unlockedbuf : public basic_pointerbuf { public: typedef basic_pointerbuf base_type; typedef typename base_type::streamsize streamsize; using base_type::pptr; using base_type::pbase; using base_type::setbuf; }; #if defined(BOOST_NO_STRINGSTREAM) template using out_stream_t = std::ostream; template using stringbuffer_t = basic_unlockedbuf; #elif defined(BOOST_NO_STD_LOCALE) template using out_stream_t = std::ostream; template using stringbuffer_t = basic_unlockedbuf; template using buffer_t = basic_unlockedbuf; #else template using out_stream_t = std::basic_ostream; template using stringbuffer_t = basic_unlockedbuf, CharT>; template using buffer_t = basic_unlockedbuf, CharT>; #endif }}} // namespace boost::detail::lcast #endif // BOOST_LEXICAL_CAST_DETAIL_CONVERTER_LEXICAL_BASIC_UNLOCKEDBUF_HPP