Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add modular library level build file. #194

Open
wants to merge 11 commits into
base: develop
Choose a base branch
from
20 changes: 20 additions & 0 deletions build.jam
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Copyright René Ferdinand Rivera Morell 2023-2024
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or copy at
# http://www.boost.org/LICENSE_1_0.txt)

require-b2 5.2 ;

project /boost/callable_traits
: common-requirements
<include>include
;

explicit
[ alias boost_callable_traits : : : : <library>$(boost_dependencies) ]
[ alias all : boost_callable_traits example test ]
;

call-if : boost-library callable_traits
;

74 changes: 37 additions & 37 deletions doc/callable_traits.qbk
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ The features in [libname] largely overlap with [function_types_link]. Here are s
# [libname] supports lvalue/rvalue reference member qualifiers.
# [libname] supports `noexcept` and `transaction_safe`.
# [function_types] does not attempt to factor all callable types into a unified, [invoke]-aware interface.
# [function_types] relies heavily on "tag" types, while [libname] follows the style of <type_traits> instead. Supporting C++11 and later in [function_types] would have required significant proliferation of these tags.
# [function_types] relies heavily on "tag" types, while [libname] follows the style of <type_traits> instead. Supporting C++11 and later in [function_types] would have required significant proliferation of these tags.

For example, here is how to remove member `const` from a member function pointer type in the [function_types] library:

Expand Down Expand Up @@ -288,106 +288,106 @@ This reference will be most beneficial to readers familiar with the following C+
* [abominable_paper]
* [@http://en.cppreference.com/w/c/language/variadic C-style variadics], a.k.a. varargs

[import ../../../boost/callable_traits/add_member_const.hpp]
[import ../include/boost/callable_traits/add_member_const.hpp]
[add_member_const_hpp]

[import ../../../boost/callable_traits/add_member_cv.hpp]
[import ../include/boost/callable_traits/add_member_cv.hpp]
[add_member_cv_hpp]

[import ../../../boost/callable_traits/add_member_lvalue_reference.hpp]
[import ../include/boost/callable_traits/add_member_lvalue_reference.hpp]
[add_member_lvalue_reference_hpp]

[import ../../../boost/callable_traits/add_member_rvalue_reference.hpp]
[import ../include/boost/callable_traits/add_member_rvalue_reference.hpp]
[add_member_rvalue_reference_hpp]

[import ../../../boost/callable_traits/add_member_volatile.hpp]
[import ../include/boost/callable_traits/add_member_volatile.hpp]
[add_member_volatile_hpp]

[import ../../../boost/callable_traits/add_noexcept.hpp]
[import ../include/boost/callable_traits/add_noexcept.hpp]
[add_noexcept_hpp]

[import ../../../boost/callable_traits/add_transaction_safe.hpp]
[import ../include/boost/callable_traits/add_transaction_safe.hpp]
[add_transaction_safe_hpp]

[import ../../../boost/callable_traits/add_varargs.hpp]
[import ../include/boost/callable_traits/add_varargs.hpp]
[add_varargs_hpp]

[import ../../../boost/callable_traits/apply_member_pointer.hpp]
[import ../include/boost/callable_traits/apply_member_pointer.hpp]
[apply_member_pointer_hpp]

[import ../../../boost/callable_traits/apply_return.hpp]
[import ../include/boost/callable_traits/apply_return.hpp]
[apply_return_hpp]

[import ../../../boost/callable_traits/args.hpp]
[import ../include/boost/callable_traits/args.hpp]
[args_hpp]

[import ../../../boost/callable_traits/class_of.hpp]
[import ../include/boost/callable_traits/class_of.hpp]
[class_of_hpp]

[import ../../../boost/callable_traits/function_type.hpp]
[import ../include/boost/callable_traits/function_type.hpp]
[function_type_hpp]

[import ../../../boost/callable_traits/has_member_qualifiers.hpp]
[import ../include/boost/callable_traits/has_member_qualifiers.hpp]
[has_member_qualifiers_hpp]

[import ../../../boost/callable_traits/has_varargs.hpp]
[import ../include/boost/callable_traits/has_varargs.hpp]
[has_varargs_hpp]

[import ../../../boost/callable_traits/has_void_return.hpp]
[import ../include/boost/callable_traits/has_void_return.hpp]
[has_void_return_hpp]

[import ../../../boost/callable_traits/is_const_member.hpp]
[import ../include/boost/callable_traits/is_const_member.hpp]
[is_const_member_hpp]

[import ../../../boost/callable_traits/is_cv_member.hpp]
[import ../include/boost/callable_traits/is_cv_member.hpp]
[is_cv_member_hpp]

[import ../../../boost/callable_traits/is_invocable.hpp]
[import ../include/boost/callable_traits/is_invocable.hpp]
[is_invocable_hpp]

[import ../../../boost/callable_traits/is_lvalue_reference_member.hpp]
[import ../include/boost/callable_traits/is_lvalue_reference_member.hpp]
[is_lvalue_reference_member_hpp]

[import ../../../boost/callable_traits/is_reference_member.hpp]
[import ../include/boost/callable_traits/is_reference_member.hpp]
[is_reference_member_hpp]

[import ../../../boost/callable_traits/is_rvalue_reference_member.hpp]
[import ../include/boost/callable_traits/is_rvalue_reference_member.hpp]
[is_rvalue_reference_member_hpp]

[import ../../../boost/callable_traits/is_noexcept.hpp]
[import ../include/boost/callable_traits/is_noexcept.hpp]
[is_noexcept_hpp]

[import ../../../boost/callable_traits/is_transaction_safe.hpp]
[import ../include/boost/callable_traits/is_transaction_safe.hpp]
[is_transaction_safe_hpp]

[import ../../../boost/callable_traits/is_volatile_member.hpp]
[import ../include/boost/callable_traits/is_volatile_member.hpp]
[is_volatile_member_hpp]

[import ../../../boost/callable_traits/qualified_class_of.hpp]
[import ../include/boost/callable_traits/qualified_class_of.hpp]
[qualified_class_of_hpp]

[import ../../../boost/callable_traits/remove_member_const.hpp]
[import ../include/boost/callable_traits/remove_member_const.hpp]
[remove_member_const_hpp]

[import ../../../boost/callable_traits/remove_member_cv.hpp]
[import ../include/boost/callable_traits/remove_member_cv.hpp]
[remove_member_cv_hpp]

[import ../../../boost/callable_traits/remove_member_reference.hpp]
[import ../include/boost/callable_traits/remove_member_reference.hpp]
[remove_member_reference_hpp]

[import ../../../boost/callable_traits/remove_member_volatile.hpp]
[import ../include/boost/callable_traits/remove_member_volatile.hpp]
[remove_member_volatile_hpp]

[import ../../../boost/callable_traits/remove_noexcept.hpp]
[import ../include/boost/callable_traits/remove_noexcept.hpp]
[remove_noexcept_hpp]

[import ../../../boost/callable_traits/remove_transaction_safe.hpp]
[import ../include/boost/callable_traits/remove_transaction_safe.hpp]
[remove_transaction_safe_hpp]

[import ../../../boost/callable_traits/remove_varargs.hpp]
[import ../include/boost/callable_traits/remove_varargs.hpp]
[remove_varargs_hpp]

[import ../../../boost/callable_traits/return_type.hpp]
[import ../include/boost/callable_traits/return_type.hpp]
[return_type_hpp]

[endsect][/section:reference]
Expand All @@ -410,12 +410,12 @@ If you ['are] writing generic code, take a moment to skim your header files, and
};

Or maybe something like this:

template<class Return, class ...Args>
class foo<Return(*)(Args...)> {
// ^^^^^^^^^^^^^^^^^^
};

Or, if you are *really* unlucky, something like this:

template<class Return, class T, class ...Args>
Expand Down
4 changes: 3 additions & 1 deletion test/Jamfile.v2
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,15 @@
# (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt)

import testing ;
import ../../config/checks/config : requires ;
import-search /boost/config/checks ;
import config : requires ;

project :
requirements
[ requires cxx11_constexpr ]
<toolset>clang:<cxxflags>"-pedantic -Wall -Wextra"
<toolset>darwin:<cxxflags>"-pedantic -Wall -Wextra"
<library>/boost/callable_traits//boost_callable_traits
;

for local source in [ glob *.cpp ]
Expand Down
Loading