os/ossrv/ossrv_pub/boost_apis/boost/archive/add_facet.hpp
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/ossrv/ossrv_pub/boost_apis/boost/archive/add_facet.hpp	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,55 @@
     1.4 +#ifndef BOOST_ARCHIVE_ADD_FACET_HPP
     1.5 +#define BOOST_ARCHIVE_ADD_FACET_HPP
     1.6 +
     1.7 +// MS compatible compilers support #pragma once
     1.8 +#if defined(_MSC_VER) && (_MSC_VER >= 1020)
     1.9 +# pragma once
    1.10 +#endif
    1.11 +
    1.12 +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
    1.13 +// add_facet.hpp
    1.14 +
    1.15 +// (C) Copyright 2003 Robert Ramey - http://www.rrsd.com . 
    1.16 +// Use, modification and distribution is subject to the Boost Software
    1.17 +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
    1.18 +// http://www.boost.org/LICENSE_1_0.txt)
    1.19 +
    1.20 +//  See http://www.boost.org for updates, documentation, and revision history.
    1.21 +
    1.22 +#include <locale>
    1.23 +#include <boost/config.hpp>
    1.24 +#include <boost/detail/workaround.hpp>
    1.25 +
    1.26 +// does STLport uses native STL for locales?
    1.27 +#if (defined(__SGI_STL_PORT)&& defined(_STLP_NO_OWN_IOSTREAMS))
    1.28 +// and this native STL lib is old Dinkumware (has not defined _CPPLIB_VER)
    1.29 +#  if (defined(_YVALS) && !defined(__IBMCPP__)) || !defined(_CPPLIB_VER)
    1.30 +#    define BOOST_ARCHIVE_OLD_DINKUMWARE_BENEATH_STLPORT
    1.31 +#  endif
    1.32 +#endif
    1.33 +
    1.34 +namespace boost { 
    1.35 +namespace archive {
    1.36 +
    1.37 +template<class Facet>
    1.38 +inline std::locale * 
    1.39 +add_facet(const std::locale &l, Facet * f){
    1.40 +    return
    1.41 +        #if defined BOOST_ARCHIVE_OLD_DINKUMWARE_BENEATH_STLPORT 
    1.42 +            // std namespace used for native locale
    1.43 +            new std::locale(std::_Addfac(l, f));
    1.44 +        #elif BOOST_WORKAROUND(BOOST_DINKUMWARE_STDLIB, == 1) // old Dinkumwar
    1.45 +            // std namespace used for native locale
    1.46 +            new std::locale(std::_Addfac(l, f));
    1.47 +        #else
    1.48 +            // standard compatible
    1.49 +            new std::locale(l, f);
    1.50 +        #endif
    1.51 +}
    1.52 +
    1.53 +} // namespace archive
    1.54 +} // namespace boost
    1.55 +
    1.56 +#undef BOOST_ARCHIVE_OLD_DINKUMWARE_BENEATH_STLPORT
    1.57 +
    1.58 +#endif // BOOST_ARCHIVE_ADD_FACET_HPP