Back to home page

EIC code displayed by LXR

 
 

    


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

0001 //
0002 // Copyright (c) 2009-2011 Artyom Beilis (Tonkikh)
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_CONFIG_HPP_INCLUDED
0008 #define BOOST_LOCALE_CONFIG_HPP_INCLUDED
0009 
0010 #include <boost/config.hpp>
0011 #include <boost/config/workaround.hpp>
0012 #ifdef __has_include
0013 #    if __has_include(<version>)
0014 #        include <version>
0015 #    endif
0016 #endif
0017 
0018 #if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_LOCALE_DYN_LINK)
0019 #    ifdef BOOST_LOCALE_SOURCE
0020 #        define BOOST_LOCALE_DECL BOOST_SYMBOL_EXPORT
0021 #    else
0022 #        define BOOST_LOCALE_DECL BOOST_SYMBOL_IMPORT
0023 #    endif // BOOST_LOCALE_SOURCE
0024 #else
0025 #    define BOOST_LOCALE_DECL
0026 #endif // BOOST_LOCALE_DYN_LINK
0027 
0028 //
0029 // Automatically link to the correct build variant where possible.
0030 //
0031 #if !defined(BOOST_ALL_NO_LIB) && !defined(BOOST_LOCALE_NO_LIB) && !defined(BOOST_LOCALE_SOURCE)
0032 //
0033 // Set the name of our library, this will get undef'ed by auto_link.hpp
0034 // once it's done with it:
0035 //
0036 #    define BOOST_LIB_NAME boost_locale
0037 //
0038 // If we're importing code from a dll, then tell auto_link.hpp about it:
0039 //
0040 #    if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_LOCALE_DYN_LINK)
0041 #        define BOOST_DYN_LINK
0042 #    endif
0043 //
0044 // And include the header that does the work:
0045 //
0046 #    include <boost/config/auto_link.hpp>
0047 #endif // auto-linking disabled
0048 
0049 // Check for some C++11 features to provide easier checks for what is missing
0050 // shortly after the requirement of C++11 in Boost 1.81
0051 // clang-format off
0052 #if defined(BOOST_NO_CXX11_DEFAULTED_FUNCTIONS) || \
0053     defined(BOOST_NO_CXX11_DEFAULTED_MOVES) ||     \
0054     defined(BOOST_NO_CXX11_HDR_FUNCTIONAL) ||      \
0055     defined(BOOST_NO_CXX11_HDR_TYPE_TRAITS) ||     \
0056     defined(BOOST_NO_CXX11_NOEXCEPT) ||            \
0057     defined(BOOST_NO_CXX11_OVERRIDE) ||            \
0058     defined(BOOST_NO_CXX11_RVALUE_REFERENCES) ||   \
0059     defined(BOOST_NO_CXX11_SMART_PTR) ||           \
0060     defined(BOOST_NO_CXX11_STATIC_ASSERT)
0061 // clang-format on
0062 #    error "Boost.Locale requires C++11 since Boost 1.81."
0063 #endif
0064 
0065 #ifdef _MSC_VER
0066 // Denote a constant condition, e.g. for if(sizeof(...
0067 #    define BOOST_LOCALE_START_CONST_CONDITION __pragma(warning(push)) __pragma(warning(disable : 4127))
0068 #    define BOOST_LOCALE_END_CONST_CONDITION __pragma(warning(pop))
0069 #else
0070 #    define BOOST_LOCALE_START_CONST_CONDITION
0071 #    define BOOST_LOCALE_END_CONST_CONDITION
0072 #endif
0073 
0074 /// \cond INTERNAL
0075 #if defined(BOOST_WINDOWS) || defined(__CYGWIN__)
0076 // Internal define to check if we have access to the Win32 API
0077 #    define BOOST_LOCALE_USE_WIN32_API 1
0078 #else
0079 #    define BOOST_LOCALE_USE_WIN32_API 0
0080 #endif
0081 
0082 // To be used to suppress false positives of UBSAN
0083 #if defined(__clang__) && defined(__has_attribute)
0084 #    if __has_attribute(no_sanitize)
0085 #        define BOOST_LOCALE_NO_SANITIZE(what) __attribute__((no_sanitize(what)))
0086 #    endif
0087 #endif
0088 #if !defined(BOOST_LOCALE_NO_SANITIZE)
0089 #    define BOOST_LOCALE_NO_SANITIZE(what)
0090 #endif
0091 
0092 #if !defined(__cpp_lib_char8_t) || BOOST_WORKAROUND(BOOST_CLANG_VERSION, < 150000)
0093 // No std::basic_string<char8_t> or bug in Clang: https://github.com/llvm/llvm-project/issues/55560
0094 #    define BOOST_LOCALE_NO_CXX20_STRING8
0095 #endif
0096 
0097 /// \endcond
0098 
0099 #endif // boost/locale/config.hpp