From acefe4358c8b3fe4474f327ee56035819fa4e022 Mon Sep 17 00:00:00 2001 From: Alexander Grund Date: Fri, 28 Feb 2020 15:21:58 +0100 Subject: [PATCH] Disable C++11 features for libstdc++ <5 --- include/boost/nowide/config.hpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/include/boost/nowide/config.hpp b/include/boost/nowide/config.hpp index 5201bfd..4e9bae5 100644 --- a/include/boost/nowide/config.hpp +++ b/include/boost/nowide/config.hpp @@ -79,7 +79,10 @@ #define BOOST_NOWIDE_FALLTHROUGH BOOST_FALLTHROUGH #endif -#if __cplusplus >= 201103L || (defined(BOOST_MSVC) && BOOST_MSVC >= 1900) +// MSVC 2015 (1900) has reasonable C++11 support (especially auto-generated move ctors) +// libstdc++ < 5 does not support movable streams +#if(__cplusplus >= 201103L || (defined(BOOST_MSVC) && BOOST_MSVC >= 1900)) \ + && (!defined(BOOST_LIBSTDCXX_VERSION) || BOOST_LIBSTDCXX_VERSION >= 50000) #define BOOST_NOWIDE_CXX11 1 #else #define BOOST_NOWIDE_CXX11 0