Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:39:15

0001 //
0002 // Copyright (c) 2022-2023 Alexander Grund
0003 //
0004 // Distributed under the Boost Software License, Version 1.0.
0005 // https://www.boost.org/LICENSE_1_0.txt
0006 
0007 #ifndef BOOST_LOCALE_DETAIL_FACET_ID_HPP_INCLUDED
0008 #define BOOST_LOCALE_DETAIL_FACET_ID_HPP_INCLUDED
0009 
0010 #include <boost/locale/config.hpp>
0011 #include <locale>
0012 
0013 /// \cond INTERNAL
0014 namespace boost { namespace locale { namespace detail {
0015 #if BOOST_CLANG_VERSION >= 40900
0016 #    pragma clang diagnostic push
0017 #    pragma clang diagnostic ignored "-Wundefined-var-template"
0018 #endif
0019     /// CRTP base class to hold the id required for facets
0020     ///
0021     /// Required because the id needs to be defined in a CPP file and hence ex/imported for shared libraries.
0022     /// However the virtual classes need to be declared as BOOST_VISIBLE to combine the VTables because otherwise
0023     /// casts/virtual-calls might be flagged as invalid by UBSAN
0024     template<class Derived>
0025     struct BOOST_LOCALE_DECL facet_id {
0026         static std::locale::id id;
0027     };
0028 #if BOOST_CLANG_VERSION >= 40900
0029 #    pragma clang diagnostic pop
0030 #endif
0031 }}} // namespace boost::locale::detail
0032 
0033 /// \endcond
0034 
0035 #endif