Skip to content

Commit 3cd4aa3

Browse files
authored
Merge pull request #645 from Becheler/feature/deprecate-cxx14
chore: deprecate cxx14
2 parents 0cbb9ac + f27cb02 commit 3cd4aa3

5 files changed

Lines changed: 30 additions & 0 deletions

File tree

‎README.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
[![Branch](https://img.shields.io/badge/branch-develop-brightgreen.svg)](https://github.com/boostorg/graph/tree/develop) [![Documentation](https://img.shields.io/badge/docs-develop-brightgreen.svg)](https://www.boost.org/doc/libs/develop/libs/graph/doc/html/graph/index.html) [![CI](https://github.com/boostorg/graph/actions/workflows/ci.yml/badge.svg?branch=develop)](https://github.com/boostorg/graph/actions/workflows/ci.yml) [![codecov](https://codecov.io/gh/boostorg/graph/branch/develop/graph/badge.svg)](https://codecov.io/gh/boostorg/graph/branch/develop) [![Deps](https://img.shields.io/badge/deps-develop-brightgreen.svg)](https://pdimov.github.io/boostdep-report/develop/graph.html) [![Enter the Matrix](https://img.shields.io/badge/matrix-develop-brightgreen.svg)](https://regression.boost.org/develop/developer/graph.html)<br/>
55
[![Docs](https://img.shields.io/badge/docs-boost.org-blue.svg)](https://www.boost.org/doc/libs/release/libs/graph/doc/index.html) [![C++14](https://img.shields.io/badge/C%2B%2B-14-blue.svg)](https://en.cppreference.com/w/cpp/14) [![License: BSL-1.0](https://img.shields.io/badge/License-BSL_1.0-blue.svg)](https://www.boost.org/LICENSE_1_0.txt) [![Boost release](https://img.shields.io/github/v/release/boostorg/boost?label=Boost&color=orange)](https://github.com/boostorg/boost/releases)
66

7+
> **CAUTION**: Boost.Graph in Boost 1.93 deprecates support for C++14 and will require C++17 from Boost 1.95 onwards (see discussion [#613](https://github.com/boostorg/graph/discussions/613)).
8+
79
The Boost Graph Library (BGL) is a generic library that allows users to:
810

911
1. Represent graph data using different structures (adjacency matrix, adjacency list, compressed sparse row, vectors of vectors, user-defined data structures).

‎build.jam‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ constant boost_dependencies :
3535
/boost/utility//boost_utility ;
3636

3737
project /boost/graph
38+
: requirements <define>BOOST_GRAPH_DISABLE_DEPRECATED_14_WARNING
3839
;
3940

4041
explicit

‎doc/modules/ROOT/pages/index.adoc‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,8 @@ existing one at specific event points (vertex discovered, edge relaxed, etc.).
6565

6666
== Requirements
6767

68+
CAUTION: Boost.Graph in Boost 1.93 deprecates support for C++14 and will require C++17 from Boost 1.95 onwards (see https://github.com/boostorg/graph/discussions/613[discussion #613]).
69+
6870
* C++14 or later
6971
* Boost headers: BGL is part of the Boost distribution and requires no separate install.
7072
It is header-only, so no build step is needed. The only exceptions are the
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
//=======================================================================
2+
// Copyright (C) 2026 Arnaud Becheler
3+
//
4+
// Distributed under the Boost Software License, Version 1.0. (See
5+
// accompanying file LICENSE_1_0.txt or copy at
6+
// http://www.boost.org/LICENSE_1_0.txt)
7+
//=======================================================================
8+
9+
#ifndef BOOST_GRAPH_DETAIL_DEPRECATE_CXX14_HPP
10+
#define BOOST_GRAPH_DETAIL_DEPRECATE_CXX14_HPP
11+
12+
#include <boost/config.hpp>
13+
#include <boost/config/pragma_message.hpp>
14+
15+
#if defined(BOOST_NO_CXX17_IF_CONSTEXPR) || defined(BOOST_NO_CXX17_INLINE_VARIABLES) \
16+
|| defined(BOOST_NO_CXX17_DEDUCTION_GUIDES) || defined(BOOST_NO_CXX17_HDR_VARIANT) \
17+
|| defined(BOOST_NO_CXX17_AUTO_NONTYPE_TEMPLATE_PARAMS) || defined(BOOST_NO_CXX17_HDR_OPTIONAL)
18+
#if !defined(BOOST_GRAPH_DISABLE_DEPRECATED_14_WARNING)
19+
BOOST_PRAGMA_MESSAGE("CAUTION: Boost.Graph in Boost 1.93 deprecates support for C++14 and will require C++17 from Boost 1.95 onwards.")
20+
BOOST_PRAGMA_MESSAGE("CAUTION: Define BOOST_GRAPH_DISABLE_DEPRECATED_14_WARNING to suppress this message.")
21+
#endif
22+
#endif
23+
24+
#endif

‎include/boost/graph/graph_traits.hpp‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
#include <boost/iterator/iterator_adaptor.hpp>
2222
#include <boost/pending/property.hpp>
2323
#include <boost/detail/workaround.hpp>
24+
#include <boost/graph/detail/deprecate_cxx14.hpp>
2425

2526
namespace boost
2627
{

0 commit comments

Comments
 (0)