Compare commits

...

4 Commits

5 changed files with 39 additions and 14 deletions

View File

@ -175,15 +175,15 @@ jobs:
container: ubuntu:24.04
os: ubuntu-latest
install: clang-18
- toolset: clang
cxxstd: "11,14,17,20,2b"
os: macos-12
- toolset: clang
cxxstd: "11,14,17,20,2b"
os: macos-13
- toolset: clang
cxxstd: "11,14,17,20,2b"
os: macos-14
- toolset: clang
cxxstd: "11,14,17,20,2b"
os: macos-15
runs-on: ${{matrix.os}}
container: ${{matrix.container}}
@ -310,9 +310,10 @@ jobs:
include:
- os: ubuntu-20.04
- os: ubuntu-22.04
- os: macos-12
- os: ubuntu-24.04
- os: macos-13
- os: macos-14
- os: macos-15
runs-on: ${{matrix.os}}
@ -358,9 +359,10 @@ jobs:
include:
- os: ubuntu-20.04
- os: ubuntu-22.04
- os: macos-12
- os: ubuntu-24.04
- os: macos-13
- os: macos-14
- os: macos-15
runs-on: ${{matrix.os}}
@ -416,9 +418,10 @@ jobs:
include:
- os: ubuntu-20.04
- os: ubuntu-22.04
- os: macos-12
- os: ubuntu-24.04
- os: macos-13
- os: macos-14
- os: macos-15
runs-on: ${{matrix.os}}

View File

@ -261,9 +261,9 @@ namespace boost {
actual invoker that will be used for the given function
object.
Each specialization contains an "apply" nested class template
Each specialization contains an "apply_" nested class template
that accepts the function object, return type, function
argument types, and allocator. The resulting "apply" class
argument types, and allocator. The resulting "apply_" class
contains two typedefs, "invoker_type" and "manager_type",
which correspond to the invoker and manager types. */
template<typename Tag>
@ -275,7 +275,7 @@ namespace boost {
{
template<typename FunctionPtr,
typename R, typename... T>
struct apply
struct apply_
{
typedef typename get_function_invoker<
FunctionPtr,
@ -308,7 +308,7 @@ namespace boost {
{
template<typename MemberPtr,
typename R, typename... T>
struct apply
struct apply_
{
typedef typename get_member_invoker<
MemberPtr,
@ -341,7 +341,7 @@ namespace boost {
{
template<typename FunctionObj,
typename R, typename... T>
struct apply
struct apply_
{
typedef typename get_function_obj_invoker<
FunctionObj,
@ -374,7 +374,7 @@ namespace boost {
{
template<typename RefWrapper,
typename R, typename... T>
struct apply
struct apply_
{
typedef typename get_function_ref_invoker<
typename RefWrapper::type,
@ -923,7 +923,7 @@ namespace boost {
typedef typename boost::detail::function::get_function_tag<Functor>::type tag;
typedef boost::detail::function::get_invoker<tag> get_invoker;
typedef typename get_invoker::
template apply<Functor, R,
template apply_<Functor, R,
T...>
handler_type;

View File

@ -6,6 +6,6 @@ include(BoostTestJamfile OPTIONAL RESULT_VARIABLE HAVE_BOOST_TEST)
if(HAVE_BOOST_TEST)
boost_test_jamfile(FILE Jamfile.v2 LINK_LIBRARIES Boost::function Boost::core Boost::lambda)
boost_test_jamfile(FILE Jamfile.v2 LINK_LIBRARIES Boost::function Boost::core Boost::lambda Boost::move)
endif()

View File

@ -93,3 +93,5 @@ run contains2_test.cpp : : : <rtti>off <toolset>gcc-4.4,<cxxstd>0x:<build>no : c
run contains3_test.cpp ;
run contains3_test.cpp : : : <rtti>off <toolset>gcc-4.4,<cxxstd>0x:<build>no : contains3_test_no_rtti ;
compile issue_53.cpp ;

20
test/issue_53.cpp Normal file
View File

@ -0,0 +1,20 @@
// Copyright 2024 Peter Dimov
// Distributed under the Boost Software License, Version 1.0.
// https://www.boost.org/LICENSE_1_0.txt
//
// https://github.com/boostorg/function/issues/53
#include <boost/bind/apply.hpp>
#include <boost/bind/bind.hpp>
#include <boost/function.hpp>
int TestArg( int, double )
{
return 0;
}
void f()
{
boost::function<int(int)> fn = boost::bind( &TestArg, boost::placeholders::_1, 1.0 );
}