File tree Expand file tree Collapse file tree
test/threads/thread/constr Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1818// template <class F, class ...Args> thread(F f, Args... args);
1919
2020#include < new>
21+ #include < cstddef>
2122#include < cstdlib>
2223#include < cassert>
2324#include < boost/thread/thread_only.hpp>
2425#include < boost/core/lightweight_test.hpp>
26+ #include < boost/config.hpp>
2527
2628unsigned throw_one = 0xFFFF ;
2729
@@ -51,6 +53,22 @@ void operator delete(void* p) BOOST_NOEXCEPT_OR_NOTHROW
5153 std::free (p);
5254}
5355
56+ #if (defined(__cpp_sized_deallocation) && (__cpp_sized_deallocation >= 201309l)) || \
57+ (BOOST_CXX_VERSION > 201103l && \
58+ (defined (__GNUC__) && (__GNUC__ >= 5 )) || \
59+ (defined (__clang__) && (__clang_major__ > 3 || (__clang_major__ == 3 && __clang_minor__ >= 4 ))) || \
60+ (defined (BOOST_MSVC) && (_MSC_VER >= 1900 )) \
61+ )
62+ #if defined BOOST_MSVC
63+ void operator delete (void * p, std::size_t )
64+ #else
65+ void operator delete (void * p, std::size_t ) BOOST_NOEXCEPT_OR_NOTHROW
66+ #endif
67+ {
68+ operator delete (p);
69+ }
70+ #endif
71+
5472bool f_run = false ;
5573
5674void f (int i, double j)
Original file line number Diff line number Diff line change 1818// template <class F, class ...Args> thread(F f, Args... args);
1919
2020#include < new>
21+ #include < cstddef>
2122#include < cstdlib>
2223#include < cassert>
2324#include < boost/thread/thread_only.hpp>
2425#include < boost/core/lightweight_test.hpp>
26+ #include < boost/config.hpp>
2527
2628unsigned throw_one = 0xFFFF ;
2729
@@ -51,6 +53,22 @@ void operator delete(void* p) BOOST_NOEXCEPT_OR_NOTHROW
5153 std::free (p);
5254}
5355
56+ #if (defined(__cpp_sized_deallocation) && (__cpp_sized_deallocation >= 201309l)) || \
57+ (BOOST_CXX_VERSION > 201103l && \
58+ (defined (__GNUC__) && (__GNUC__ >= 5 )) || \
59+ (defined (__clang__) && (__clang_major__ > 3 || (__clang_major__ == 3 && __clang_minor__ >= 4 ))) || \
60+ (defined (BOOST_MSVC) && (_MSC_VER >= 1900 )) \
61+ )
62+ #if defined BOOST_MSVC
63+ void operator delete (void * p, std::size_t )
64+ #else
65+ void operator delete (void * p, std::size_t ) BOOST_NOEXCEPT_OR_NOTHROW
66+ #endif
67+ {
68+ operator delete (p);
69+ }
70+ #endif
71+
5472bool f_run = false ;
5573
5674void f ()
Original file line number Diff line number Diff line change 1818// template <class Clousure> thread(Clousure f);
1919
2020#include < new>
21+ #include < cstddef>
2122#include < cstdlib>
2223#include < cassert>
2324#include < boost/thread/thread_only.hpp>
2425#include < boost/core/lightweight_test.hpp>
26+ #include < boost/config.hpp>
2527
2628#if ! defined BOOST_NO_CXX11_LAMBDAS
2729
@@ -51,6 +53,22 @@ void operator delete(void* p) BOOST_NOEXCEPT_OR_NOTHROW
5153 std::free (p);
5254}
5355
56+ #if (defined(__cpp_sized_deallocation) && (__cpp_sized_deallocation >= 201309l)) || \
57+ (BOOST_CXX_VERSION > 201103l && \
58+ (defined (__GNUC__) && (__GNUC__ >= 5 )) || \
59+ (defined (__clang__) && (__clang_major__ > 3 || (__clang_major__ == 3 && __clang_minor__ >= 4 ))) || \
60+ (defined (BOOST_MSVC) && (_MSC_VER >= 1900 )) \
61+ )
62+ #if defined BOOST_MSVC
63+ void operator delete (void * p, std::size_t )
64+ #else
65+ void operator delete (void * p, std::size_t ) BOOST_NOEXCEPT_OR_NOTHROW
66+ #endif
67+ {
68+ operator delete (p);
69+ }
70+ #endif
71+
5472bool f_run = false ;
5573
5674int main ()
You can’t perform that action at this time.
0 commit comments