From d6bc84961a32cc974f8957c52de6abe6071446b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20=C5=81oskot?= Date: Fri, 27 Mar 2020 12:11:43 +0100 Subject: [PATCH] Deprecate C++03 in Boost 1.73 Following discussion in #590, we are identifying support for C++03 as a candidate for removal from future releases of Boost.Geometry. Issue deprecation warning during compilation in C++03 conformance mode Users can define BOOST_GEOMETRY_DISABLE_DEPRECATED_03_WARNING to disable it. --- README.md | 2 ++ doc/compiling.qbk | 2 ++ include/boost/geometry/geometry.hpp | 9 +++++++++ 3 files changed, 13 insertions(+) diff --git a/README.md b/README.md index f4af8ed1d2..238b6b23c2 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # ![Boost.Geometry](doc/other/logo/logo_bkg.png) +> **CAUTION**: Boost.Geometry in Boost 1.73 deprecates support for the C++03 and will require C++14 from Boost 1.75 onwards (see issue [#590](https://github.com/boostorg/geometry/issues/590)). + Boost.Geometry, part of collection of the [Boost C++ Libraries](http://github.com/boostorg), defines concepts, primitives and algorithms for solving geometry problems. [![Licence](https://img.shields.io/badge/license-boost-4480cc.png)](http://www.boost.org/LICENSE_1_0.txt) diff --git a/doc/compiling.qbk b/doc/compiling.qbk index dbfd12de51..f10c54d406 100644 --- a/doc/compiling.qbk +++ b/doc/compiling.qbk @@ -15,6 +15,8 @@ [def __msvc__ MSVC] [def __stlport__ [@http://sourceforge.net/projects/stlport STLport]] +[caution Boost.Geometry in Boost 1.73 deprecates support for the C++03 and will require C++14 from Boost 1.75 onwards] + __boost_geometry__ is a headers-only library. Users only need to include the library headers in their programs in order to be able to access definitions and algorithms provided by the __boost_geometry__ library. No linking against diff --git a/include/boost/geometry/geometry.hpp b/include/boost/geometry/geometry.hpp index 5c2c58e4cb..244ecabfbe 100644 --- a/include/boost/geometry/geometry.hpp +++ b/include/boost/geometry/geometry.hpp @@ -20,6 +20,15 @@ #ifndef BOOST_GEOMETRY_GEOMETRY_HPP #define BOOST_GEOMETRY_GEOMETRY_HPP +#include +#include +#if defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) || defined(BOOST_NO_CXX11_RVALUE_REFERENCES) || defined(BOOST_NO_CXX11_HDR_MEMORY) +#if !defined(BOOST_GEOMETRY_DISABLE_DEPRECATED_03_WARNING) +BOOST_PRAGMA_MESSAGE("CAUTION: Boost.Geometry in Boost 1.73 deprecates support for the C++03 and will require C++14 from Boost 1.75 onwards.") +BOOST_PRAGMA_MESSAGE("CAUTION: Define BOOST_GEOMETRY_DISABLE_DEPRECATED_03_WARNING to suppress this message.") +#endif +#endif + // Shortcut to include all header files #include