Skip to content

Commit e4ae6b7

Browse files
committed
fable: Force compilation stop when C++ standard less than 17
1 parent 2e34ce6 commit e4ae6b7

File tree

10 files changed

+15
-1
lines changed

10 files changed

+15
-1
lines changed

fable/include/fable/conf.hpp

+1
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@
5757

5858
#include <fmt/format.h> // for fmt::format
5959

60+
#include <fable/fable_fwd.hpp>
6061
#include <fable/json.hpp> // for Json
6162

6263
namespace fable {

fable/include/fable/confable.hpp

+1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525

2626
#include <memory> // for unique_ptr<>
2727

28+
#include <fable/fable_fwd.hpp>
2829
#include <fable/json.hpp> // for Json
2930
#include <fable/conf.hpp> // for Conf
3031

fable/include/fable/enum.hpp

+1
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
#include <type_traits> // for enable_if_t<>, is_enum<>
2828
#include <utility> // for make_pair, move
2929

30+
#include <fable/fable_fwd.hpp>
3031
#include <fable/json.hpp>
3132

3233
/**

fable/include/fable/environment.hpp

+2
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@
2929
#include <utility> // for pair<>, move, make_pair
3030
#include <optional> // for optional<>
3131

32+
#include <fable/fable_fwd.hpp>
33+
3234
namespace fable {
3335

3436
class Environment {

fable/include/fable/error.hpp

+1
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
#include <fmt/format.h> // for format
2828

2929
#include <fable/conf.hpp> // for Conf
30+
#include <fable/fable_fwd.hpp>
3031
#include <fable/json.hpp> // for Json
3132

3233
namespace fable {

fable/include/fable/fable.hpp

-1
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,4 @@
3232
#include <fable/error.hpp>
3333
#include <fable/json.hpp>
3434
#include <fable/utility/memory.hpp>
35-
#include <fable/utility/optional.hpp>
3635
#include <fable/schema.hpp>

fable/include/fable/fable_fwd.hpp

+5
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,11 @@
1919
* \file fable/fable_fwd.hpp
2020
*/
2121

22+
#if __cplusplus < 201703L
23+
#error "the fable library requires a minimum standard of C++17"
24+
#include <force_compiler_to_stop_here>
25+
#endif
26+
2227
#include <string>
2328

2429
#include <nlohmann/detail/value_t.hpp>

fable/include/fable/json.hpp

+2
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@
2828

2929
#include <nlohmann/json.hpp> // for Json
3030

31+
#include <fable/fable_fwd.hpp>
32+
3133
namespace fable {
3234

3335
/**

fable/include/fable/schema.hpp

+1
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@
120120
#include <utility> // for move
121121
#include <vector> // for vector<>
122122

123+
#include <fable/fable_fwd.hpp>
123124
#include <fable/schema/array.hpp> // for Array<>
124125
#include <fable/schema/boolean.hpp> // for Boolean
125126
#include <fable/schema/confable.hpp> // for FromConfable

fable/include/fable/utility/gtest.hpp

+1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525

2626
#include <gtest/gtest.h> // for ASSERT_THROW, ASSERT_EQ
2727

28+
#include <fable/fable_fwd.hpp>
2829
#include <fable/conf.hpp> // for Conf, Json
2930
#include <fable/confable.hpp> // for Confable
3031
#include <fable/schema.hpp> // for Schema

0 commit comments

Comments
 (0)