From 5fa7797ec6b2d709da2bacee029fcc23332726b7 Mon Sep 17 00:00:00 2001 From: Matt Borland Date: Tue, 31 May 2022 20:19:22 -0700 Subject: [PATCH] Bump minimum language standard to C++14 (#788) * Bump minimum language standard to C++14 * Add warning message in config * Update readme and keep C++14 in GCC5 drone run --- .drone.star | 2 +- .github/workflows/ci.yml | 6 +++--- README.md | 4 ++-- include/boost/math/tools/config.hpp | 11 +++++++++++ 4 files changed, 17 insertions(+), 6 deletions(-) diff --git a/.drone.star b/.drone.star index 22a127991..7a1e321a4 100644 --- a/.drone.star +++ b/.drone.star @@ -17,7 +17,7 @@ def main(ctx): things_to_test = [ "special_fun", "distribution_tests", "mp", "misc", "interpolators", "quadrature", "autodiff", "long-running-tests", "float128_tests" ] sanitizer_test = [ "special_fun", "distribution_tests", "misc", "interpolators", "quadrature", "float128_tests" ] - gnu_5_stds = [ "gnu++11" ] + gnu_5_stds = [ "gnu++11", "gnu++14" ] gnu_6_stds = [ "gnu++11", "gnu++14" ] gnu_8_stds = [ "gnu++11", "gnu++14", "gnu++17" ] gnu_10_stds = [ "gnu++11", "gnu++14", "gnu++17", "gnu++20" ] diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0e3576aed..e582876fb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -210,7 +210,7 @@ jobs: fail-fast: false matrix: compiler: [ g++-6, clang++-6.0, g++-7, g++-8, clang++-7, clang++-8 ] - standard: [ c++11, c++14, c++17 ] + standard: [ c++14, c++17 ] suite: [ float128_tests, special_fun, distribution_tests, misc, quadrature, mp, interpolators, autodiff, ../example//examples, ../tools ] steps: - uses: actions/checkout@v2 @@ -322,7 +322,7 @@ jobs: fail-fast: false matrix: toolset: [ gcc, msvc-14.0, msvc-14.2 ] - standard: [ 11, 14, 17 ] + standard: [ 14, 17 ] suite: [ float128_tests, special_fun, distribution_tests, misc, quadrature, mp, interpolators, autodiff, ../example//examples, ../tools ] steps: - uses: actions/checkout@v2 @@ -542,7 +542,7 @@ jobs: fail-fast: false matrix: compiler: [ g++-10 ] - standard: [ c++11, c++14, c++17, c++2a ] + standard: [ c++14, c++17, c++20 ] suite: [ float128_tests, special_fun, distribution_tests, misc, quadrature, interpolators, autodiff, ../example//examples, ../tools ] steps: - uses: actions/checkout@v2 diff --git a/README.md b/README.md index d6f6b920f..b9dba9a9a 100644 --- a/README.md +++ b/README.md @@ -2,8 +2,8 @@ Boost Math Library [![Build Status](https://drone.cpp.al/api/badges/boostorg/math/status.svg)](https://drone.cpp.al/boostorg/math)[![Build Status](https://github.com/boostorg/math/workflows/CI/badge.svg?branch=develop)](https://github.com/boostorg/math/actions) ================== ->ANNOUNCEMENT: Support for C++03 is now deprecated in this library and will be supported in existing features ->only until March 2021. New features will require *at least* C++11, as will existing features from next year. +>ANNOUNCEMENT: Support for C++11 will be deprecated in this library starting in July 2023 (Boost 1.82). +>New features will require *at least* C++14, as will existing features starting with the deprecation release. This library is divided into several interconnected parts: diff --git a/include/boost/math/tools/config.hpp b/include/boost/math/tools/config.hpp index 6eeb0b952..09db298a8 100644 --- a/include/boost/math/tools/config.hpp +++ b/include/boost/math/tools/config.hpp @@ -13,6 +13,17 @@ #include +// Minimum language standard transition +#ifdef _MSVC_LANG +# if _MSVC_LANG < 201402L +# pragma warning("The minimum language standard to use Boost.Math will be C++14 starting in July 2023 (Boost 1.82 release)"); +# endif +#else +# if __cplusplus < 201402L +# warning "The minimum language standard to use Boost.Math will be C++14 starting in July 2023 (Boost 1.82 release)" +# endif +#endif + #ifndef BOOST_MATH_STANDALONE #include