Skip to content

Commit a513e53

Browse files
committed
1 parent 5fb09cd commit a513e53

2 files changed

Lines changed: 27 additions & 25 deletions

File tree

appveyor.yml

Lines changed: 16 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -42,27 +42,22 @@ environment:
4242
TOOLSET: gcc
4343
VARIANT: release
4444

45-
# The following configurations fail with
46-
# ./boost/thread/detail/invoke.hpp:101:43: internal compiler error: in gimplify_expr, at gimplify.c:12039
47-
# https://sourceforge.net/p/mingw-w64/bugs/694/
48-
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83756
49-
#
50-
# - ADDPATH: C:\mingw\bin;
51-
# TOOLSET: gcc
52-
# CXXSTD: 11
53-
# VARIANT: debug
54-
#
55-
# - ADDPATH: C:\cygwin64\bin;
56-
# TOOLSET: gcc
57-
# VARIANT: debug
58-
#
59-
# - ADDPATH: C:\mingw-w64\x86_64-6.3.0-posix-seh-rt_v5-rev1\mingw64\bin;
60-
# TOOLSET: gcc
61-
# VARIANT: debug
62-
#
63-
# - ADDPATH: C:\mingw-w64\x86_64-8.1.0-posix-seh-rt_v6-rev0\mingw64\bin;
64-
# TOOLSET: gcc
65-
# VARIANT: debug,release
45+
- ADDPATH: C:\mingw\bin;
46+
TOOLSET: gcc
47+
CXXSTD: 11
48+
VARIANT: debug
49+
50+
- ADDPATH: C:\cygwin64\bin;
51+
TOOLSET: gcc
52+
VARIANT: debug
53+
54+
- ADDPATH: C:\mingw-w64\x86_64-6.3.0-posix-seh-rt_v5-rev1\mingw64\bin;
55+
TOOLSET: gcc
56+
VARIANT: debug
57+
58+
- ADDPATH: C:\mingw-w64\x86_64-8.1.0-posix-seh-rt_v6-rev0\mingw64\bin;
59+
TOOLSET: gcc
60+
VARIANT: debug,release
6661

6762
install:
6863
- set GIT_FETCH_JOBS=8

include/boost/thread/detail/invoke.hpp

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
#include <boost/type_traits/is_base_of.hpp>
3333
#include <boost/type_traits/is_pointer.hpp>
3434
#include <boost/type_traits/is_member_function_pointer.hpp>
35+
#include <boost/type_traits/is_member_object_pointer.hpp>
3536
#include <boost/type_traits/remove_reference.hpp>
3637
#ifndef BOOST_NO_CXX11_HDR_FUNCTIONAL
3738
#include <functional>
@@ -85,31 +86,37 @@ namespace boost
8586

8687
// bullets 3 and 4
8788

88-
template <class Fp, class A0>
89+
// enable_if avoids
90+
//
91+
// ./boost/thread/detail/invoke.hpp:101:43: internal compiler error: in gimplify_expr, at gimplify.c:12039
92+
// https://sourceforge.net/p/mingw-w64/bugs/694/
93+
// https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83756
94+
95+
template <class Fp, class A0, class En = typename boost::enable_if<boost::is_member_object_pointer<Fp> >::type>
8996
inline auto
9097
invoke(BOOST_THREAD_RV_REF(Fp) f, BOOST_THREAD_RV_REF(A0) a0)
9198
-> decltype(boost::forward<A0>(a0).*f)
9299
{
93100
return boost::forward<A0>(a0).*f;
94101
}
95102

96-
template <class Fp, class A0>
103+
template <class Fp, class A0, class En = typename boost::enable_if<boost::is_member_object_pointer<Fp> >::type>
97104
inline auto
98105
invoke(BOOST_THREAD_RV_REF(Fp) f, BOOST_THREAD_RV_REF(A0) a0)
99106
-> decltype((*boost::forward<A0>(a0)).*f)
100107
{
101108
return (*boost::forward<A0>(a0)).*f;
102109
}
103110

104-
template <class R, class Fp, class A0>
111+
template <class R, class Fp, class A0, class En = typename boost::enable_if<boost::is_member_object_pointer<Fp> >::type>
105112
inline auto
106113
invoke(BOOST_THREAD_RV_REF(Fp) f, BOOST_THREAD_RV_REF(A0) a0)
107114
-> decltype(boost::forward<A0>(a0).*f)
108115
{
109116
return boost::forward<A0>(a0).*f;
110117
}
111118

112-
template <class R, class Fp, class A0>
119+
template <class R, class Fp, class A0, class En = typename boost::enable_if<boost::is_member_object_pointer<Fp> >::type>
113120
inline auto
114121
invoke(BOOST_THREAD_RV_REF(Fp) f, BOOST_THREAD_RV_REF(A0) a0)
115122
-> decltype((*boost::forward<A0>(a0)).*f)

0 commit comments

Comments
 (0)