From f2da16c9f6802e310fe22d05fbf83be7957a6c40 Mon Sep 17 00:00:00 2001 From: Vinnie Falco Date: Thu, 27 Jul 2017 06:39:07 -0700 Subject: [PATCH] Don't build pre-C++11 --- CHANGELOG.md | 1 + Jamfile | 5 +++-- include/boost/beast/config.hpp | 24 +++++++++++++++++++----- 3 files changed, 23 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index be841edf..260006ef 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ Version 91: * Adjust redirect html +* Don't build pre-C++11 -------------------------------------------------------------------------------- diff --git a/Jamfile b/Jamfile index 221938ff..43cc5ba9 100644 --- a/Jamfile +++ b/Jamfile @@ -13,7 +13,7 @@ import boost ; import modules ; import testing ; -#import ../config/checks/config : requires ; +import ../config/checks/config : requires ; boost.use-project ; @@ -66,7 +66,8 @@ variant ubasan "-fsanitize=address,undefined" ; -#local REQ = [ requires cxx11_variadic_templates cxx11_template_aliases cxx11_decltype cxx11_hdr_type_traits cxx11_hdr_tuple ] ; +#cxx11_hdr_type_traits +local REQ = [ requires cxx11_variadic_templates cxx11_template_aliases cxx11_decltype cxx11_hdr_tuple ] ; project beast : requirements diff --git a/include/boost/beast/config.hpp b/include/boost/beast/config.hpp index 404dcf3d..89f2ec8c 100644 --- a/include/boost/beast/config.hpp +++ b/include/boost/beast/config.hpp @@ -25,11 +25,25 @@ 14.0 (2015 Update 3) 1900 190024210 */ -#ifdef BOOST_MSVC -#if BOOST_MSVC_FULL_VER < 190024210 -static_assert(false, - "This library requires Visual Studio 2015 Update 3 or later"); -#endif +#if defined(BOOST_MSVC) +# if BOOST_MSVC_FULL_VER < 190024210 + static_assert(false, "Beast requires C++11: Visual Studio 2015 Update 3 or later needed"); +# endif + +#elif defined(BOOST_GCC) +# if(BOOST_GCC < 40801) + static_assert(false, "Beast requires C++11: gcc version 4.8 or later needed"); +# endif + +#else +# if \ + defined(BOOST_NO_CXX11_DECLTYPE) || \ + defined(BOOST_NO_CXX11_HDR_TUPLE) || \ + defined(BOOST_NO_CXX11_TEMPLATE_ALIASES) || \ + defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) + static_assert(false, "Beast requires C++11: a conforming compiler is needed"); +# endif + #endif #endif