sl@0: #ifndef BOOST_ARCHIVE_ADD_FACET_HPP sl@0: #define BOOST_ARCHIVE_ADD_FACET_HPP sl@0: sl@0: // MS compatible compilers support #pragma once sl@0: #if defined(_MSC_VER) && (_MSC_VER >= 1020) sl@0: # pragma once sl@0: #endif sl@0: sl@0: /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 sl@0: // add_facet.hpp sl@0: sl@0: // (C) Copyright 2003 Robert Ramey - http://www.rrsd.com . sl@0: // Use, modification and distribution is subject to the Boost Software sl@0: // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at sl@0: // http://www.boost.org/LICENSE_1_0.txt) sl@0: sl@0: // See http://www.boost.org for updates, documentation, and revision history. sl@0: sl@0: #include sl@0: #include sl@0: #include sl@0: sl@0: // does STLport uses native STL for locales? sl@0: #if (defined(__SGI_STL_PORT)&& defined(_STLP_NO_OWN_IOSTREAMS)) sl@0: // and this native STL lib is old Dinkumware (has not defined _CPPLIB_VER) sl@0: # if (defined(_YVALS) && !defined(__IBMCPP__)) || !defined(_CPPLIB_VER) sl@0: # define BOOST_ARCHIVE_OLD_DINKUMWARE_BENEATH_STLPORT sl@0: # endif sl@0: #endif sl@0: sl@0: namespace boost { sl@0: namespace archive { sl@0: sl@0: template sl@0: inline std::locale * sl@0: add_facet(const std::locale &l, Facet * f){ sl@0: return sl@0: #if defined BOOST_ARCHIVE_OLD_DINKUMWARE_BENEATH_STLPORT sl@0: // std namespace used for native locale sl@0: new std::locale(std::_Addfac(l, f)); sl@0: #elif BOOST_WORKAROUND(BOOST_DINKUMWARE_STDLIB, == 1) // old Dinkumwar sl@0: // std namespace used for native locale sl@0: new std::locale(std::_Addfac(l, f)); sl@0: #else sl@0: // standard compatible sl@0: new std::locale(l, f); sl@0: #endif sl@0: } sl@0: sl@0: } // namespace archive sl@0: } // namespace boost sl@0: sl@0: #undef BOOST_ARCHIVE_OLD_DINKUMWARE_BENEATH_STLPORT sl@0: sl@0: #endif // BOOST_ARCHIVE_ADD_FACET_HPP