diff --git a/.appveyor.yml b/.appveyor.yml index 31ebc6d..585675b 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -37,7 +37,6 @@ environment: # B2_THREADING: threading=multi,single B2_VARIANT: release B2_FLAGS: testing.execute=off - B2_DEFINES: BOOST_LOCALE_DISABLE_DEPRECATED_03_WARNING matrix: - FLAVOR: Visual Studio 2008, 2010, 2012 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4987224..40bf7d5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -30,7 +30,6 @@ env: B2_CI_VERSION: 1 B2_VARIANT: debug,release B2_LINK: shared,static - B2_DEFINES: BOOST_LOCALE_DISABLE_DEPRECATED_03_WARNING LCOV_BRANCH_COVERAGE: 0 CODECOV_NAME: Github Actions diff --git a/CMakeLists.txt b/CMakeLists.txt index e9566fd..5e09099 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -36,6 +36,7 @@ add_library(boost_locale add_library(Boost::locale ALIAS boost_locale) target_include_directories(boost_locale PUBLIC include PRIVATE src) +target_compile_features(boost_locale PUBLIC cxx_std_11) target_link_libraries(boost_locale PUBLIC diff --git a/build/Jamfile.v2 b/build/Jamfile.v2 index 3229550..3f080f6 100644 --- a/build/Jamfile.v2 +++ b/build/Jamfile.v2 @@ -5,6 +5,7 @@ # Distributed under the Boost Software License, Version 1.0. # https://www.boost.org/LICENSE_1_0.txt. +import config : requires ; import configure ; import feature ; import os ; @@ -411,6 +412,19 @@ rule configure-flags ( properties * ) alias build_flags : : : : @configure-flags ; +local cxx_requirements = [ requires + cxx11_auto_declarations + cxx11_defaulted_functions + cxx11_defaulted_moves + cxx11_hdr_functional + cxx11_hdr_type_traits + cxx11_noexcept + cxx11_override + cxx11_rvalue_references + cxx11_smart_ptr + cxx11_static_assert + ] ; + boost-lib locale : encoding/codepage.cpp @@ -427,6 +441,7 @@ boost-lib locale util/info.cpp util/locale_data.cpp : + $(cxx_requirements) # Don't link explicitly, not required BOOST_THREAD_NO_LIB=1 $(TOP)/src @@ -436,4 +451,5 @@ boost-lib locale clang:"-Wno-long-long -Wno-deprecated-declarations" # Meanwhile remove this @configure + : : $(cxx_requirements) ; diff --git a/doc/changelog.txt b/doc/changelog.txt index d9b1aa9..f62e788 100644 --- a/doc/changelog.txt +++ b/doc/changelog.txt @@ -8,6 +8,8 @@ /*! \page changelog Changelog +- 1.81.0 + - Require C++11 or higher - 1.80.0 - Deprecated support for C++03 and earlier, C++11 will be required in the next release - Provide `-sICU_LINK_LOCALE` as a temporary replacement for `-sICU_LINK` which is incompatible with Boost.Regex. @@ -19,7 +21,7 @@ - Fix build failures due to missing includes - Handle or suppress many warnings which makes the build log cleaner - 1.67.0 - - Added support of unique_ptr interface in addition to C++2003 auto_ptr - in order to support C++2017, now you can use BOOST_LOCALE_HIDE_AUTO_PTR definiton to remove auto_ptr from the interfaces and prevent deprecated watnings + - Added support of unique_ptr interface in addition to C++2003 auto_ptr - in order to support C++2017, now you can use BOOST_LOCALE_HIDE_AUTO_PTR definition to remove auto_ptr from the interfaces and prevent deprecated watnings - Fixed test problem with ICU >60.1 - Fix of solaris build - Fixed wired FreeBSD/clang issue on optimized build. Probably compiler workaround diff --git a/include/boost/locale/config.hpp b/include/boost/locale/config.hpp index 518b601..3c7d836 100644 --- a/include/boost/locale/config.hpp +++ b/include/boost/locale/config.hpp @@ -46,25 +46,18 @@ #define BOOST_LOCALE_USE_AUTO_PTR 1 #endif -// Check for C++11 features that will be used in Boost 1.81 -// If you are using Boost.Locale and REALLY require it to keep -// supporting C++03/C++98 please comment with a detailed description -// of your use case and reasoning why using C++11 is not possible in -// https://github.com/boostorg/locale/issues/90 -#if !defined(BOOST_LOCALE_DISABLE_DEPRECATED_03_WARNING) && ( \ - defined(BOOST_NO_CXX11_DEFAULTED_FUNCTIONS) || \ - defined(BOOST_NO_CXX11_DEFAULTED_MOVES) || \ - defined(BOOST_NO_CXX11_HDR_FUNCTIONAL) || \ - defined(BOOST_NO_CXX11_HDR_TYPE_TRAITS) || \ - defined(BOOST_NO_CXX11_NOEXCEPT) || \ - defined(BOOST_NO_CXX11_OVERRIDE) || \ - defined(BOOST_NO_CXX11_RVALUE_REFERENCES) || \ - defined(BOOST_NO_CXX11_SMART_PTR) || \ - defined(BOOST_NO_CXX11_STATIC_ASSERT) \ - ) - #include - BOOST_PRAGMA_MESSAGE("CAUTION: Boost.Locale support for C++03 is deprecated. C++11 will be required from Boost 1.81 onwards.") - BOOST_PRAGMA_MESSAGE("CAUTION: Define BOOST_LOCALE_DISABLE_DEPRECATED_03_WARNING to suppress this message.") +// Check for some C++11 features to provide easier checks for what is missing +// shortly after the requirement of C++11 in Boost 1.81 +#if defined(BOOST_NO_CXX11_DEFAULTED_FUNCTIONS) || \ + defined(BOOST_NO_CXX11_DEFAULTED_MOVES) || \ + defined(BOOST_NO_CXX11_HDR_FUNCTIONAL) || \ + defined(BOOST_NO_CXX11_HDR_TYPE_TRAITS) || \ + defined(BOOST_NO_CXX11_NOEXCEPT) || \ + defined(BOOST_NO_CXX11_OVERRIDE) || \ + defined(BOOST_NO_CXX11_RVALUE_REFERENCES) || \ + defined(BOOST_NO_CXX11_SMART_PTR) || \ + defined(BOOST_NO_CXX11_STATIC_ASSERT) + #error "Boost.Locale requires C++11 since Boost 1.81." #endif #ifdef _MSC_VER diff --git a/meta/libraries.json b/meta/libraries.json index 081ff45..d3c157b 100644 --- a/meta/libraries.json +++ b/meta/libraries.json @@ -12,5 +12,5 @@ "Artyom Beilis ", "Alexander Grund " ], - "cxxstd": "03" + "cxxstd": "11" }