Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
pdimov committed Oct 13, 2023
1 parent 5fb09cd commit a513e53
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 25 deletions.
37 changes: 16 additions & 21 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,27 +42,22 @@ environment:
TOOLSET: gcc
VARIANT: release

# The following configurations fail with
# ./boost/thread/detail/invoke.hpp:101:43: internal compiler error: in gimplify_expr, at gimplify.c:12039
# https://sourceforge.net/p/mingw-w64/bugs/694/
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83756
#
# - ADDPATH: C:\mingw\bin;
# TOOLSET: gcc
# CXXSTD: 11
# VARIANT: debug
#
# - ADDPATH: C:\cygwin64\bin;
# TOOLSET: gcc
# VARIANT: debug
#
# - ADDPATH: C:\mingw-w64\x86_64-6.3.0-posix-seh-rt_v5-rev1\mingw64\bin;
# TOOLSET: gcc
# VARIANT: debug
#
# - ADDPATH: C:\mingw-w64\x86_64-8.1.0-posix-seh-rt_v6-rev0\mingw64\bin;
# TOOLSET: gcc
# VARIANT: debug,release
- ADDPATH: C:\mingw\bin;
TOOLSET: gcc
CXXSTD: 11
VARIANT: debug

- ADDPATH: C:\cygwin64\bin;
TOOLSET: gcc
VARIANT: debug

- ADDPATH: C:\mingw-w64\x86_64-6.3.0-posix-seh-rt_v5-rev1\mingw64\bin;
TOOLSET: gcc
VARIANT: debug

- ADDPATH: C:\mingw-w64\x86_64-8.1.0-posix-seh-rt_v6-rev0\mingw64\bin;
TOOLSET: gcc
VARIANT: debug,release

install:
- set GIT_FETCH_JOBS=8
Expand Down
15 changes: 11 additions & 4 deletions include/boost/thread/detail/invoke.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
#include <boost/type_traits/is_base_of.hpp>
#include <boost/type_traits/is_pointer.hpp>
#include <boost/type_traits/is_member_function_pointer.hpp>
#include <boost/type_traits/is_member_object_pointer.hpp>
#include <boost/type_traits/remove_reference.hpp>
#ifndef BOOST_NO_CXX11_HDR_FUNCTIONAL
#include <functional>
Expand Down Expand Up @@ -85,31 +86,37 @@ namespace boost

// bullets 3 and 4

template <class Fp, class A0>
// enable_if avoids
//
// ./boost/thread/detail/invoke.hpp:101:43: internal compiler error: in gimplify_expr, at gimplify.c:12039
// https://sourceforge.net/p/mingw-w64/bugs/694/
// https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83756

template <class Fp, class A0, class En = typename boost::enable_if<boost::is_member_object_pointer<Fp> >::type>
inline auto
invoke(BOOST_THREAD_RV_REF(Fp) f, BOOST_THREAD_RV_REF(A0) a0)
-> decltype(boost::forward<A0>(a0).*f)
{
return boost::forward<A0>(a0).*f;
}

template <class Fp, class A0>
template <class Fp, class A0, class En = typename boost::enable_if<boost::is_member_object_pointer<Fp> >::type>
inline auto
invoke(BOOST_THREAD_RV_REF(Fp) f, BOOST_THREAD_RV_REF(A0) a0)
-> decltype((*boost::forward<A0>(a0)).*f)
{
return (*boost::forward<A0>(a0)).*f;
}

template <class R, class Fp, class A0>
template <class R, class Fp, class A0, class En = typename boost::enable_if<boost::is_member_object_pointer<Fp> >::type>
inline auto
invoke(BOOST_THREAD_RV_REF(Fp) f, BOOST_THREAD_RV_REF(A0) a0)
-> decltype(boost::forward<A0>(a0).*f)
{
return boost::forward<A0>(a0).*f;
}

template <class R, class Fp, class A0>
template <class R, class Fp, class A0, class En = typename boost::enable_if<boost::is_member_object_pointer<Fp> >::type>
inline auto
invoke(BOOST_THREAD_RV_REF(Fp) f, BOOST_THREAD_RV_REF(A0) a0)
-> decltype((*boost::forward<A0>(a0)).*f)
Expand Down

0 comments on commit a513e53

Please sign in to comment.