File indexing completed on 2025-01-18 09:38:49
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010 #ifndef BOOST_IOSTREAMS_DETAIL_ADD_FACET_HPP_INCLUDED
0011 #define BOOST_IOSTREAMS_DETAIL_ADD_FACET_HPP_INCLUDED
0012
0013 #if defined(_MSC_VER)
0014 # pragma once
0015 #endif
0016
0017 #include <boost/config.hpp> // BOOST_DINKUMWARE_STDLIB.
0018 #include <boost/detail/workaround.hpp>
0019
0020
0021
0022
0023 #if (defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION)) && \
0024 defined(_STLP_NO_OWN_IOSTREAMS) \
0025
0026 # if (defined(_YVALS) && !defined(__IBMCPP__)) || defined(_CPPLIB_VER)
0027 # define BOOST_IOSTREMS_STLPORT_WITH_OLD_DINKUMWARE
0028 # endif
0029 #endif
0030
0031 namespace boost { namespace iostreams { namespace detail {
0032
0033 template<class Facet>
0034 inline std::locale add_facet(const std::locale &l, Facet * f)
0035 {
0036 return
0037 #if BOOST_WORKAROUND(BOOST_DINKUMWARE_STDLIB, == 1) || \
0038 defined(BOOST_IOSTREMS_STLPORT_WITH_OLD_DINKUMWARE) \
0039
0040 std::locale(std::_Addfac(l, f));
0041 #else
0042
0043 std::locale(l, f);
0044 #endif
0045 }
0046
0047 } } }
0048
0049 #endif