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 #if defined(BOOST_LOCALE_HIDE_AUTO_PTR) || defined(BOOST_NO_AUTO_PTR)
44 #define BOOST_LOCALE_USE_AUTO_PTR 0
45 #else
46 #define BOOST_LOCALE_USE_AUTO_PTR 1
47 #endif
48 
49 // Check for C++11 features that will be used in Boost 1.81
50 // If you are using Boost.Locale and REALLY require it to keep
51 // supporting C++03/C++98 please comment with a detailed description
52 // of your use case and reasoning why using C++11 is not possible in
53 // https://github.com/boostorg/locale/issues/90
54 #if !defined(BOOST_LOCALE_DISABLE_DEPRECATED_03_WARNING) && ( \
55  defined(BOOST_NO_CXX11_DEFAULTED_FUNCTIONS) || \
56  defined(BOOST_NO_CXX11_DEFAULTED_MOVES) || \
57  defined(BOOST_NO_CXX11_HDR_FUNCTIONAL) || \
58  defined(BOOST_NO_CXX11_HDR_TYPE_TRAITS) || \
59  defined(BOOST_NO_CXX11_NOEXCEPT) || \
60  defined(BOOST_NO_CXX11_OVERRIDE) || \
61  defined(BOOST_NO_CXX11_RVALUE_REFERENCES) || \
62  defined(BOOST_NO_CXX11_SMART_PTR) || \
63  defined(BOOST_NO_CXX11_STATIC_ASSERT) \
64  )
65  #include <boost/config/pragma_message.hpp>
66  BOOST_PRAGMA_MESSAGE("CAUTION: Boost.Locale support for C++03 is deprecated. C++11 will be required from Boost 1.81 onwards.")
67  BOOST_PRAGMA_MESSAGE("CAUTION: Define BOOST_LOCALE_DISABLE_DEPRECATED_03_WARNING to suppress this message.")
68 #endif
69 
70 #ifdef _MSC_VER
71 // Denote a constant condition, e.g. for if(sizeof(...
72 #define BOOST_LOCALE_START_CONST_CONDITION __pragma(warning(push)) __pragma(warning(disable : 4127))
73 #define BOOST_LOCALE_END_CONST_CONDITION __pragma(warning(pop))
74 #else
75 #define BOOST_LOCALE_START_CONST_CONDITION
76 #define BOOST_LOCALE_END_CONST_CONDITION
77 #endif
78 
79 #endif // boost/locale/config.hpp
80 
basic_message< char > message
Definition: message.hpp:493