Boost.Locale
config.hpp
1 //
2 // Copyright (c) 2009-2011 Artyom Beilis (Tonkikh)
3 //
4 // Distributed under the Boost Software License, Version 1.0.
5 // https://www.boost.org/LICENSE_1_0.txt
6 
7 #ifndef BOOST_LOCALE_CONFIG_HPP_INCLUDED
8 #define BOOST_LOCALE_CONFIG_HPP_INCLUDED
9 
10 #include <boost/config.hpp>
11 
12 #if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_LOCALE_DYN_LINK)
13 # ifdef BOOST_LOCALE_SOURCE
14 # define BOOST_LOCALE_DECL BOOST_SYMBOL_EXPORT
15 # else
16 # define BOOST_LOCALE_DECL BOOST_SYMBOL_IMPORT
17 # endif // BOOST_LOCALE_SOURCE
18 #else
19 # define BOOST_LOCALE_DECL
20 #endif // BOOST_LOCALE_DYN_LINK
21 
22 //
23 // Automatically link to the correct build variant where possible.
24 //
25 #if !defined(BOOST_ALL_NO_LIB) && !defined(BOOST_LOCALE_NO_LIB) && !defined(BOOST_LOCALE_SOURCE)
26 //
27 // Set the name of our library, this will get undef'ed by auto_link.hpp
28 // once it's done with it:
29 //
30 # define BOOST_LIB_NAME boost_locale
31 //
32 // If we're importing code from a dll, then tell auto_link.hpp about it:
33 //
34 # if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_LOCALE_DYN_LINK)
35 # define BOOST_DYN_LINK
36 # endif
37 //
38 // And include the header that does the work:
39 //
40 # include <boost/config/auto_link.hpp>
41 #endif // auto-linking disabled
42 
43 // Check for some C++11 features to provide easier checks for what is missing
44 // shortly after the requirement of C++11 in Boost 1.81
45 // clang-format off
46 #if defined(BOOST_NO_CXX11_DEFAULTED_FUNCTIONS) || \
47  defined(BOOST_NO_CXX11_DEFAULTED_MOVES) || \
48  defined(BOOST_NO_CXX11_HDR_FUNCTIONAL) || \
49  defined(BOOST_NO_CXX11_HDR_TYPE_TRAITS) || \
50  defined(BOOST_NO_CXX11_NOEXCEPT) || \
51  defined(BOOST_NO_CXX11_OVERRIDE) || \
52  defined(BOOST_NO_CXX11_RVALUE_REFERENCES) || \
53  defined(BOOST_NO_CXX11_SMART_PTR) || \
54  defined(BOOST_NO_CXX11_STATIC_ASSERT)
55 // clang-format on
56 # error "Boost.Locale requires C++11 since Boost 1.81."
57 #endif
58 
59 #ifdef _MSC_VER
60 // Denote a constant condition, e.g. for if(sizeof(...
61 # define BOOST_LOCALE_START_CONST_CONDITION __pragma(warning(push)) __pragma(warning(disable : 4127))
62 # define BOOST_LOCALE_END_CONST_CONDITION __pragma(warning(pop))
63 #else
64 # define BOOST_LOCALE_START_CONST_CONDITION
65 # define BOOST_LOCALE_END_CONST_CONDITION
66 #endif
67 
69 #if defined(BOOST_WINDOWS) || defined(__CYGWIN__)
70 // Internal define to check if we have access to the Win32 API
71 # define BOOST_LOCALE_USE_WIN32_API 1
72 #else
73 # define BOOST_LOCALE_USE_WIN32_API 0
74 #endif
75 
77 #endif // boost/locale/config.hpp