Skip to content

Commit 3e1e0a9

Browse files
committed
Attach C++ requirements to the library target.
This exposes C++ requirements of Boost.Scope to the downstream users.
1 parent 3530ff1 commit 3e1e0a9

3 files changed

Lines changed: 29 additions & 17 deletions

File tree

build.jam

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,43 @@
11
# Copyright René Ferdinand Rivera Morell 2024
2+
# Copyright Andrey Semashev 2025
3+
#
24
# Distributed under the Boost Software License, Version 1.0.
35
# (See accompanying file LICENSE_1_0.txt or copy at
46
# http://www.boost.org/LICENSE_1_0.txt)
57

68
require-b2 5.2 ;
79

10+
import-search /boost/config/checks ;
11+
import config : requires ;
12+
813
constant boost_dependencies :
914
/boost/assert//boost_assert
1015
/boost/config//boost_config
1116
/boost/core//boost_core
1217
/boost/type_traits//boost_type_traits ;
1318

19+
local cxx_requirements = [ requires
20+
exceptions
21+
sfinae_expr
22+
cxx11_constexpr
23+
cxx11_noexcept
24+
cxx11_decltype
25+
cxx11_rvalue_references
26+
cxx11_template_aliases
27+
cxx11_variadic_templates
28+
cxx11_defaulted_functions
29+
cxx11_deleted_functions
30+
cxx11_function_template_default_args
31+
cxx11_hdr_type_traits
32+
] ;
33+
1434
project /boost/scope
1535
: common-requirements
1636
<include>include
1737
;
1838

1939
explicit
20-
[ alias boost_scope : : : : <library>$(boost_dependencies) ]
40+
[ alias boost_scope : : $(cxx_requirements) : : $(cxx_requirements) <library>$(boost_dependencies) ]
2141
[ alias all : boost_scope test ]
2242
;
2343

test/Jamfile

Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2023-2024 Andrey Semashev
1+
# Copyright 2023-2025 Andrey Semashev
22
#
33
# Distributed under the Boost Software License, Version 1.0.
44
# (See accompanying file LICENSE_1_0.txt or copy at
@@ -21,25 +21,18 @@ project
2121
<c++-template-depth>1024
2222

2323
[ requires
24-
# Requirements of Boost.Scope implementation
2524
exceptions
26-
sfinae_expr
27-
cxx11_constexpr
28-
cxx11_noexcept
29-
cxx11_rvalue_references
30-
cxx11_decltype
31-
cxx11_template_aliases
32-
cxx11_variadic_templates
33-
cxx11_defaulted_functions
34-
cxx11_deleted_functions
35-
cxx11_function_template_default_args
36-
cxx11_hdr_type_traits
37-
38-
# Requirements of Boost.Scope tests
3925
cxx11_nullptr
4026
cxx11_lambdas
27+
cxx11_decltype
28+
cxx11_noexcept
29+
cxx11_constexpr
30+
cxx11_template_aliases
31+
cxx11_rvalue_references
4132
cxx11_auto_declarations
4233
cxx11_unified_initialization_syntax
34+
cxx11_defaulted_functions
35+
cxx11_deleted_functions
4336
cxx11_hdr_system_error
4437
]
4538

test/run/unique_resource.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
#include <ostream>
2020
#include <utility>
2121
#include <stdexcept>
22-
#include <type_traits>
2322

2423
template< typename Resource >
2524
struct empty_resource_deleter

0 commit comments

Comments
 (0)