Skip to content

Commit

Permalink
Deprecate C++03 in Boost 1.73
Browse files Browse the repository at this point in the history
Following discussion in boostorg#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.
  • Loading branch information
mloskot committed Mar 28, 2020
1 parent 2015302 commit d6bc849
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
2 changes: 2 additions & 0 deletions doc/compiling.qbk
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 9 additions & 0 deletions include/boost/geometry/geometry.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,15 @@
#ifndef BOOST_GEOMETRY_GEOMETRY_HPP
#define BOOST_GEOMETRY_GEOMETRY_HPP

#include <boost/config.hpp>
#include <boost/config/pragma_message.hpp>
#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 <boost/geometry/core/closure.hpp>
Expand Down

0 comments on commit d6bc849

Please sign in to comment.