Compare commits

..

7 Commits

6 changed files with 77 additions and 31 deletions

View File

@ -193,8 +193,8 @@ local windows_pipeline(name, image, environment, arch = "amd64") =
),
linux_pipeline(
"Linux 23.04 GCC 13 32/64",
"cppalliance/droneubuntu2304:1",
"Linux 24.04 GCC 13 32/64",
"cppalliance/droneubuntu2404:1",
{ TOOLSET: 'gcc', COMPILER: 'g++-13', CXXSTD: '11,14,17,20,2b', ADDRMD: '32,64' },
"g++-13-multilib",
),
@ -333,22 +333,22 @@ local windows_pipeline(name, image, environment, arch = "amd64") =
),
linux_pipeline(
"Linux 23.04 Clang 16",
"cppalliance/droneubuntu2304:1",
"Linux 24.04 Clang 16",
"cppalliance/droneubuntu2404:1",
{ TOOLSET: 'clang', COMPILER: 'clang++-16', CXXSTD: '11,14,17,20,2b' },
"clang-16",
),
linux_pipeline(
"Linux 23.10 Clang 17 UBSAN",
"cppalliance/droneubuntu2310:1",
"Linux 24.04 Clang 17 UBSAN",
"cppalliance/droneubuntu2404:1",
{ TOOLSET: 'clang', COMPILER: 'clang++-17', CXXSTD: '11,14,17,20,2b' } + ubsan,
"clang-17",
),
linux_pipeline(
"Linux 23.10 Clang 17 ASAN",
"cppalliance/droneubuntu2310:1",
"Linux 24.04 Clang 17 ASAN",
"cppalliance/droneubuntu2404:1",
{ TOOLSET: 'clang', COMPILER: 'clang++-17', CXXSTD: '11,14,17,20,2b' } + asan,
"clang-17",
),
@ -367,6 +367,13 @@ local windows_pipeline(name, image, environment, arch = "amd64") =
"clang-18",
),
linux_pipeline(
"Linux 24.10 Clang 19",
"cppalliance/droneubuntu2410:1",
{ TOOLSET: 'clang', COMPILER: 'clang++-19', CXXSTD: '11,14,17,20,2b' },
"clang-19",
),
macos_pipeline(
"MacOS 10.15 Xcode 12.2 UBSAN",
{ TOOLSET: 'clang', COMPILER: 'clang++', CXXSTD: '11,14,17,2a' } + ubsan,

View File

@ -79,7 +79,7 @@ jobs:
address-model: 32,64
- toolset: gcc-13
cxxstd: "11,14,17,20,2b"
container: ubuntu:23.04
container: ubuntu:24.04
os: ubuntu-latest
install: g++-13-multilib
address-model: 32,64
@ -160,13 +160,13 @@ jobs:
- toolset: clang
compiler: clang++-16
cxxstd: "11,14,17,20,2b"
container: ubuntu:23.04
container: ubuntu:24.04
os: ubuntu-latest
install: clang-16
- toolset: clang
compiler: clang++-17
cxxstd: "11,14,17,20,2b"
container: ubuntu:23.10
container: ubuntu:24.04
os: ubuntu-latest
install: clang-17
- toolset: clang
@ -176,34 +176,48 @@ jobs:
os: ubuntu-latest
install: clang-18
- toolset: clang
compiler: clang++-19
cxxstd: "11,14,17,20,2b"
os: macos-12
container: ubuntu:24.10
os: ubuntu-latest
install: clang-19
- 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}}
container:
image: ${{matrix.container}}
volumes:
- /node20217:/node20217:rw,rshared
- ${{ startsWith(matrix.container, 'ubuntu:1') && '/node20217:/__e/node20:ro,rshared' || ' ' }}
defaults:
run:
shell: bash
steps:
- name: Enable Node 16
run: |
echo "ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION=true" >> $GITHUB_ENV
- uses: actions/checkout@v3
- name: Setup container environment
if: matrix.container
run: |
apt-get update
apt-get -y install sudo python3 git g++
apt-get -y install sudo python3 git g++ curl xz-utils
- name: Install nodejs20glibc2.17
if: ${{ startsWith( matrix.container, 'ubuntu:1' ) }}
run: |
curl -LO https://archives.boost.io/misc/node/node-v20.9.0-linux-x64-glibc-217.tar.xz
tar -xf node-v20.9.0-linux-x64-glibc-217.tar.xz --strip-components 1 -C /node20217
ldd /__e/node20/bin/node
- uses: actions/checkout@v4
- name: Install packages
if: matrix.install
@ -310,9 +324,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 +373,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 +432,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 );
}