annotate DEPENDENCIES/generic/include/boost/archive/add_facet.hpp @ 133:4acb5d8d80b6 tip

Don't fail environmental check if README.md exists (but .txt and no-suffix don't)
author Chris Cannam
date Tue, 30 Jul 2019 12:25:44 +0100
parents c530137014c0
children
rev   line source
Chris@16 1 #ifndef BOOST_ARCHIVE_ADD_FACET_HPP
Chris@16 2 #define BOOST_ARCHIVE_ADD_FACET_HPP
Chris@16 3
Chris@16 4 // MS compatible compilers support #pragma once
Chris@101 5 #if defined(_MSC_VER)
Chris@16 6 # pragma once
Chris@16 7 #endif
Chris@16 8
Chris@16 9 /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
Chris@16 10 // add_facet.hpp
Chris@16 11
Chris@16 12 // (C) Copyright 2003 Robert Ramey - http://www.rrsd.com .
Chris@16 13 // Use, modification and distribution is subject to the Boost Software
Chris@16 14 // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
Chris@16 15 // http://www.boost.org/LICENSE_1_0.txt)
Chris@16 16
Chris@16 17 // See http://www.boost.org for updates, documentation, and revision history.
Chris@16 18
Chris@16 19 #include <locale>
Chris@16 20 #include <boost/config.hpp>
Chris@16 21 #include <boost/detail/workaround.hpp>
Chris@16 22
Chris@16 23 // does STLport uses native STL for locales?
Chris@16 24 #if (defined(__SGI_STL_PORT)&& defined(_STLP_NO_OWN_IOSTREAMS))
Chris@16 25 // and this native STL lib is old Dinkumware (has not defined _CPPLIB_VER)
Chris@16 26 # if (defined(_YVALS) && !defined(__IBMCPP__)) || !defined(_CPPLIB_VER)
Chris@16 27 # define BOOST_ARCHIVE_OLD_DINKUMWARE_BENEATH_STLPORT
Chris@16 28 # endif
Chris@16 29 #endif
Chris@16 30
Chris@16 31 namespace boost {
Chris@16 32 namespace archive {
Chris@16 33
Chris@16 34 template<class Facet>
Chris@16 35 inline std::locale *
Chris@16 36 add_facet(const std::locale &l, Facet * f){
Chris@16 37 return
Chris@16 38 #if defined BOOST_ARCHIVE_OLD_DINKUMWARE_BENEATH_STLPORT
Chris@16 39 // std namespace used for native locale
Chris@16 40 new std::locale(std::_Addfac(l, f));
Chris@16 41 #elif BOOST_WORKAROUND(BOOST_DINKUMWARE_STDLIB, == 1) // old Dinkumwar
Chris@16 42 // std namespace used for native locale
Chris@16 43 new std::locale(std::_Addfac(l, f));
Chris@16 44 #else
Chris@16 45 // standard compatible
Chris@16 46 new std::locale(l, f);
Chris@16 47 #endif
Chris@16 48 }
Chris@16 49
Chris@16 50 } // namespace archive
Chris@16 51 } // namespace boost
Chris@16 52
Chris@16 53 #undef BOOST_ARCHIVE_OLD_DINKUMWARE_BENEATH_STLPORT
Chris@16 54
Chris@16 55 #endif // BOOST_ARCHIVE_ADD_FACET_HPP