Compare commits

...

4 Commits

Author SHA1 Message Date
Peter Dimov
89dfb032f2 Rename apply to apply_ to avoid msvc-14.3 conflict. Fixes #53. 2024-10-12 21:58:15 +03:00
Peter Dimov
ac731c96bb Add test for #53. Refs #53. 2024-10-12 21:32:25 +03:00
Peter Dimov
f3a164eaeb Update test/CMakeLists.txt 2024-10-07 22:36:22 +03:00
Peter Dimov
620c01266f Remove macos-12 from ci.yml, add macos-15 and ubuntu-24.04 2024-10-07 22:32:25 +03:00
5 changed files with 39 additions and 14 deletions

View File

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

View File

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

View File

@@ -6,6 +6,6 @@ include(BoostTestJamfile OPTIONAL RESULT_VARIABLE HAVE_BOOST_TEST)
if(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() 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 ;
run contains3_test.cpp : : : <rtti>off <toolset>gcc-4.4,<cxxstd>0x:<build>no : contains3_test_no_rtti ; 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 );
}