Compare commits

...

16 Commits

Author SHA1 Message Date
89f5011b4a Merge branch 'develop' 2023-02-24 18:02:30 +00:00
1ebd31e60e Remove redundant CI test. 2023-02-23 18:23:02 +00:00
155cb2e47c Merge pull request #178 from Lastique/feature/is_swappable
Add `is swappable` trait.
2023-02-23 18:20:08 +00:00
55feb756e5 Merge branch 'develop' 2023-02-22 18:57:32 +00:00
5f43b22861 Reuse is_swappable implementation in is_nothrow_swappable for gcc < 4.7.
This avoids applying noexcept operator to a potentially invalid
swap expression, which should resolve ICE with gcc 4.6.
2023-02-19 16:22:48 +03:00
fc61f298bf Added is_swappable(_with) traits. 2023-02-19 16:22:41 +03:00
1c31fee575 Extracted C++11 implementation of is_nothrow_swappable to a separate header.
Also modified the implementation to avoid referencing any potential swap
overloads in namespace boost, unless these overloads are found by ADL.

Added tests to verify is_nothrow_swappable works with ADL.
2023-02-18 23:53:35 +03:00
74995c5d84 Update operators docs.
Fixes https://github.com/boostorg/type_traits/issues/160.
2022-11-27 09:12:25 +00:00
2370288a79 Update operators docs.
Fixes https://github.com/boostorg/type_traits/issues/160.
2022-11-21 18:24:04 +00:00
6ffc0e5ebd Merge pull request #176 from boostorg/pr/char8_t-is-integral
Specialize boost::is_integral for char8_t when available. Fixes #175.
2022-11-06 18:37:51 +00:00
f753087cd0 Specialize boost::is_integral for char8_t when available. Fixes #175. 2022-10-30 03:45:54 +03:00
990166cd59 Merge pull request #174 from ecatmur/clang-15-intrinsics
Replace clang 15 deprecated intrinsics
2022-09-13 12:08:26 +01:00
e1d0699a82 Move test for __has_builtin to enclosing #if
Clang has __has_builtin since at least version 3
2022-09-12 12:29:09 +01:00
a1d0b207c5 Replace deprecated intrinsics
https://github.com/boostorg/type_traits/issues/173
2022-09-06 20:05:36 +01:00
fdef681a84 Merge pull request #172 from Flamefire/wundef
Make build `-Wundef` clean
2022-07-07 11:17:26 +01:00
d71524a799 Make build -Wundef clean
Use `#ifdef __cpp_noexcept_function_type` instead of
`#if __cpp_noexcept_function_type` to avoid `-Wundef` warnings.
Also add that flag to the test flags to detect those on CI.
2022-07-07 10:05:05 +02:00
24 changed files with 632 additions and 127 deletions

View File

@ -236,7 +236,7 @@ jobs:
strategy:
fail-fast: false
matrix:
standard: [ 14, 17 ]
standard: [ 14 ]
steps:
- uses: actions/checkout@v2
with:

View File

@ -1,4 +1,4 @@
[/
[/
Copyright 2009 John Maddock.
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at
@ -7,6 +7,11 @@
[section:history History]
[h4 Boost-1.82.0]
* Added __is_swappable trait.
* Added a workaround for gcc 4.6 that allows __is_nothrow_swappable to work.
[h4 Boost-1.70.0]
* Added new traits __is_bounded_array, __is_unbounded_array, __copy_reference, __copy_cv_ref.

View File

@ -1148,7 +1148,15 @@
All traits are implemented the same way using preprocessor macros to avoid
code duplication. The main files are in <code class="literal">boost/type_traits/detail</code>:
<code class="literal">has_binary_operator.hpp</code>, <code class="literal">has_prefix_operator.hpp</code>
and <code class="literal">has_postfix_operator.hpp</code>. The example of prefix
and <code class="literal">has_postfix_operator.hpp</code>.
</p>
<p>
Given a sufficiently conforming C++11 compiler, these traits are implemented
in a rather compact and straightforward way that should always give accurate
answers.
</p>
<p>
In C++03 there is a legacy implementation, by way of example the prefix
<code class="computeroutput"><span class="keyword">operator</span><span class="special">-</span></code>
is presented below:
</p>
@ -1324,7 +1332,7 @@
<span class="phrase"><a name="boost_typetraits.category.value_traits.operators.limitation"></a></span><a class="link" href="operators.html#boost_typetraits.category.value_traits.operators.limitation">Limitation</a>
</h6>
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem">
Requires a compiler with working SFINAE.
Prior to C++11, requires a compiler with working SFINAE.
</li></ul></div>
<h6>
<a name="boost_typetraits.category.value_traits.operators.h6"></a>
@ -1333,21 +1341,22 @@
</h6>
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
These traits cannot detect whether the operators are public or not:
if an operator is defined as a private member of type <code class="computeroutput"><span class="identifier">T</span></code> then the instantiation of the corresponding
trait will produce a compiler error. For this reason these traits cannot
be used to determine whether a type has a public operator or not.
Prior to C++11, these traits cannot detect whether the operators are
public or not: if an operator is defined as a private member of type
<code class="computeroutput"><span class="identifier">T</span></code> then the instantiation
of the corresponding trait will produce a compiler error. For this
reason these traits cannot be used to determine whether a type has
a public operator or not.
<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">A</span> <span class="special">{</span> <span class="keyword">private</span><span class="special">:</span> <span class="identifier">A</span> <span class="keyword">operator</span><span class="special">-();</span> <span class="special">};</span>
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">has_unary_minus</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">&gt;::</span><span class="identifier">value</span><span class="special">;</span> <span class="comment">// error: A::operator-() is private</span>
</pre>
</li>
<li class="listitem">
There is an issue if the operator exists only for type <code class="computeroutput"><span class="identifier">A</span></code> and <code class="computeroutput"><span class="identifier">B</span></code>
is convertible to <code class="computeroutput"><span class="identifier">A</span></code>.
In this case, the compiler will report an ambiguous overload because
both the existing operator and the one we provide (with argument of
type <code class="computeroutput"><span class="identifier">any</span></code>) need type
conversion, so that none is preferred.
Prior to C++11, there is an issue if the operator exists only for type
<code class="computeroutput"><span class="identifier">A</span></code> and <code class="computeroutput"><span class="identifier">B</span></code> is convertible to <code class="computeroutput"><span class="identifier">A</span></code>. In this case, the compiler will
report an ambiguous overload because both the existing operator and
the one we provide (with argument of type <code class="computeroutput"><span class="identifier">any</span></code>)
need type conversion, so that none is preferred.
<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">A</span> <span class="special">{</span> <span class="special">};</span>
<span class="keyword">void</span> <span class="keyword">operator</span><span class="special">-(</span><span class="keyword">const</span> <span class="identifier">A</span><span class="special">&amp;);</span>
<span class="keyword">struct</span> <span class="identifier">B</span> <span class="special">{</span> <span class="keyword">operator</span> <span class="identifier">A</span><span class="special">();</span> <span class="special">};</span>
@ -1388,7 +1397,7 @@
<span class="keyword">class</span> <span class="identifier">bad</span> <span class="special">{</span> <span class="special">};</span>
<span class="keyword">class</span> <span class="identifier">good</span> <span class="special">{</span> <span class="special">};</span>
<span class="keyword">bool</span> <span class="identifier">f</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">good</span><span class="special">&amp;,</span> <span class="keyword">const</span> <span class="identifier">good</span><span class="special">&amp;)</span> <span class="special">{</span> <span class="special">}</span>
<span class="keyword">bool</span> <span class="identifier">f</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">good</span><span class="special">&amp;,</span> <span class="keyword">const</span> <span class="identifier">good</span><span class="special">&amp;)</span> <span class="special">{</span> <span class="keyword">return</span> <span class="keyword">true</span><span class="special">;</span> <span class="special">}</span>
<span class="keyword">int</span> <span class="identifier">main</span><span class="special">()</span> <span class="special">{</span>
<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span><span class="special">&lt;&lt;</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">boolalpha</span><span class="special">;</span>

View File

@ -24,7 +24,7 @@
</div>
<div class="section">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="id1124648"></a>Class Index</h2></div></div></div>
<a name="id1192383"></a>Class Index</h2></div></div></div>
<p><a class="link" href="s11.html#idx_id_0">A</a> <a class="link" href="s11.html#idx_id_2">C</a> <a class="link" href="s11.html#idx_id_3">D</a> <a class="link" href="s11.html#idx_id_4">E</a> <a class="link" href="s11.html#idx_id_5">F</a> <a class="link" href="s11.html#idx_id_6">H</a> <a class="link" href="s11.html#idx_id_7">I</a> <a class="link" href="s11.html#idx_id_8">M</a> <a class="link" href="s11.html#idx_id_9">N</a> <a class="link" href="s11.html#idx_id_10">O</a> <a class="link" href="s11.html#idx_id_11">P</a> <a class="link" href="s11.html#idx_id_12">R</a> <a class="link" href="s11.html#idx_id_13">T</a></p>
<div class="variablelist"><dl class="variablelist">
<dt>

View File

@ -24,7 +24,7 @@
</div>
<div class="section">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="id1128255"></a>Typedef Index</h2></div></div></div>
<a name="id1195400"></a>Typedef Index</h2></div></div></div>
<p><a class="link" href="s12.html#idx_id_21">F</a> <a class="link" href="s12.html#idx_id_28">R</a> <a class="link" href="s12.html#idx_id_29">T</a> <a class="link" href="s12.html#idx_id_31">V</a></p>
<div class="variablelist"><dl class="variablelist">
<dt>

View File

@ -24,7 +24,7 @@
</div>
<div class="section">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="id1128464"></a>Macro Index</h2></div></div></div>
<a name="id1195591"></a>Macro Index</h2></div></div></div>
<p><a class="link" href="s13.html#idx_id_33">B</a></p>
<div class="variablelist"><dl class="variablelist">
<dt>

View File

@ -23,7 +23,7 @@
</div>
<div class="section">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="id1130188"></a>Index</h2></div></div></div>
<a name="id1196594"></a>Index</h2></div></div></div>
<p><a class="link" href="s14.html#idx_id_48">A</a> <a class="link" href="s14.html#idx_id_49">B</a> <a class="link" href="s14.html#idx_id_50">C</a> <a class="link" href="s14.html#idx_id_51">D</a> <a class="link" href="s14.html#idx_id_52">E</a> <a class="link" href="s14.html#idx_id_53">F</a> <a class="link" href="s14.html#idx_id_54">H</a> <a class="link" href="s14.html#idx_id_55">I</a> <a class="link" href="s14.html#idx_id_56">M</a> <a class="link" href="s14.html#idx_id_57">N</a> <a class="link" href="s14.html#idx_id_58">O</a> <a class="link" href="s14.html#idx_id_59">P</a> <a class="link" href="s14.html#idx_id_60">R</a> <a class="link" href="s14.html#idx_id_61">T</a> <a class="link" href="s14.html#idx_id_62">U</a> <a class="link" href="s14.html#idx_id_63">V</a></p>
<div class="variablelist"><dl class="variablelist">
<dt>

26
doc/is_swappable.qbk Normal file
View File

@ -0,0 +1,26 @@
[/
Copyright 2023 Andrey Semashev
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt).
]
[section:is_swappable is_swappable]
template <class T>
struct is_swappable : public __tof {};
__inherit If the expression `swap(declval<T&>(), declval<T&>())` (in a context
where `std::swap` is visible) is valid, inherits from __true_type, otherwise from __false_type.
__compat This trait requires C++11 for full support. On C++03 compilers it will inherit from __true_type
for scalar types (including integral, floating point, enumeration, pointer and pointer-to-member types)
and from __false_type for anything else. If MSVC standard library is used, C++17
is required for full support. In this case, in C++11 and C++14 modes the trait will inherit from __true_type
for types that support move construction and move assignment and from __false_type for other types.
__header ` #include <boost/type_traits/is_swappable.hpp>` or ` #include <boost/type_traits.hpp>`
[endsect]

View File

@ -247,7 +247,11 @@ All traits are implemented the same way using preprocessor macros to avoid code
duplication.
The main files are in [^boost/type_traits/detail]: [^has_binary_operator.hpp],
[^has_prefix_operator.hpp] and [^has_postfix_operator.hpp].
The example of prefix `operator-` is presented below:
Given a sufficiently conforming C++11 compiler, these traits are implemented in a rather
compact and straightforward way that should always give accurate answers.
In C++03 there is a legacy implementation, by way of example the prefix `operator-` is presented below:
``
namespace boost {
@ -416,11 +420,11 @@ struct has_unary_minus : ::boost::integral_constant<bool,(::boost::detail::has_u
[heading Limitation]
* Requires a compiler with working SFINAE.
* Prior to C++11, requires a compiler with working SFINAE.
[heading Known issues]
* These traits cannot detect whether the operators are public or not:
* Prior to C++11, these traits cannot detect whether the operators are public or not:
if an operator is defined as a private member of type `T` then
the instantiation of the corresponding trait will produce a compiler error.
For this reason these traits cannot be used to determine whether a type has a
@ -430,7 +434,7 @@ struct A { private: A operator-(); };
boost::has_unary_minus<A>::value; // error: A::operator-() is private
``
* There is an issue if the operator exists only for type `A` and `B` is
* Prior to C++11, there is an issue if the operator exists only for type `A` and `B` is
convertible to `A`. In this case, the compiler will report an ambiguous overload
because both the existing operator and the one we provide (with argument of type
`any`) need type conversion, so that none is preferred.

View File

@ -108,6 +108,7 @@
[def __is_nothrow_move_constructible [link boost_typetraits.reference.is_nothrow_move_constructible is_nothrow_move_constructible]]
[def __has_nothrow_assign [link boost_typetraits.reference.has_nothrow_assign has_nothrow_assign]]
[def __is_nothrow_move_assignable [link boost_typetraits.reference.is_nothrow_move_assignable is_nothrow_move_assignable]]
[def __is_swappable [link boost_typetraits.reference.is_swappable is_swappable]]
[def __is_nothrow_swappable [link boost_typetraits.reference.is_nothrow_swappable is_nothrow_swappable]]
[def __is_base_of [link boost_typetraits.reference.is_base_of is_base_of]]
@ -440,6 +441,7 @@ See __has_trivial_constructor.
[include is_scoped_enum.qbk]
[include is_signed.qbk]
[include is_stateless.qbk]
[include is_swappable.qbk]
[include is_trivially_copyable.qbk]
[include is_unbounded_array.qbk]
[include is_union.qbk]

View File

@ -131,6 +131,7 @@
#include <boost/type_traits/is_scoped_enum.hpp>
#include <boost/type_traits/is_signed.hpp>
#include <boost/type_traits/is_stateless.hpp>
#include <boost/type_traits/is_swappable.hpp>
#include <boost/type_traits/is_trivially_copyable.hpp>
#include <boost/type_traits/is_union.hpp>
#include <boost/type_traits/is_unscoped_enum.hpp>

View File

@ -49,7 +49,7 @@ struct is_function_ptr_helper<R(*)()> { BOOST_STATIC_CONSTANT(bool, value = true
template <class R >
struct is_function_ptr_helper<R(*)(...)> { BOOST_STATIC_CONSTANT(bool, value = true); };
#endif
#if __cpp_noexcept_function_type
#ifdef __cpp_noexcept_function_type
template <class R >
struct is_function_ptr_helper<R(*)()noexcept> { BOOST_STATIC_CONSTANT(bool, value = true); };
#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING
@ -63,7 +63,7 @@ struct is_function_ptr_helper<R(*)(T0)> { BOOST_STATIC_CONSTANT(bool, value = tr
template <class R, class T0>
struct is_function_ptr_helper<R(*)(T0 ...)> { BOOST_STATIC_CONSTANT(bool, value = true); };
#endif
#if __cpp_noexcept_function_type
#ifdef __cpp_noexcept_function_type
template <class R, class T0>
struct is_function_ptr_helper<R(*)(T0)noexcept> { BOOST_STATIC_CONSTANT(bool, value = true); };
#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING
@ -77,7 +77,7 @@ struct is_function_ptr_helper<R(*)(T0, T1)> { BOOST_STATIC_CONSTANT(bool, value
template <class R, class T0, class T1>
struct is_function_ptr_helper<R(*)(T0, T1 ...)> { BOOST_STATIC_CONSTANT(bool, value = true); };
#endif
#if __cpp_noexcept_function_type
#ifdef __cpp_noexcept_function_type
template <class R, class T0, class T1>
struct is_function_ptr_helper<R(*)(T0, T1)noexcept> { BOOST_STATIC_CONSTANT(bool, value = true); };
#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING
@ -91,7 +91,7 @@ struct is_function_ptr_helper<R(*)(T0, T1, T2)> { BOOST_STATIC_CONSTANT(bool, va
template <class R, class T0, class T1, class T2>
struct is_function_ptr_helper<R(*)(T0, T1, T2 ...)> { BOOST_STATIC_CONSTANT(bool, value = true); };
#endif
#if __cpp_noexcept_function_type
#ifdef __cpp_noexcept_function_type
template <class R, class T0, class T1, class T2>
struct is_function_ptr_helper<R(*)(T0, T1, T2)noexcept> { BOOST_STATIC_CONSTANT(bool, value = true); };
#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING
@ -105,7 +105,7 @@ struct is_function_ptr_helper<R(*)(T0, T1, T2, T3)> { BOOST_STATIC_CONSTANT(bool
template <class R, class T0, class T1, class T2, class T3>
struct is_function_ptr_helper<R(*)(T0, T1, T2, T3 ...)> { BOOST_STATIC_CONSTANT(bool, value = true); };
#endif
#if __cpp_noexcept_function_type
#ifdef __cpp_noexcept_function_type
template <class R, class T0, class T1, class T2, class T3>
struct is_function_ptr_helper<R(*)(T0, T1, T2, T3)noexcept> { BOOST_STATIC_CONSTANT(bool, value = true); };
#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING
@ -119,7 +119,7 @@ struct is_function_ptr_helper<R(*)(T0, T1, T2, T3, T4)> { BOOST_STATIC_CONSTANT(
template <class R, class T0, class T1, class T2, class T3, class T4>
struct is_function_ptr_helper<R(*)(T0, T1, T2, T3, T4 ...)> { BOOST_STATIC_CONSTANT(bool, value = true); };
#endif
#if __cpp_noexcept_function_type
#ifdef __cpp_noexcept_function_type
template <class R, class T0, class T1, class T2, class T3, class T4>
struct is_function_ptr_helper<R(*)(T0, T1, T2, T3, T4)noexcept> { BOOST_STATIC_CONSTANT(bool, value = true); };
#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING
@ -133,7 +133,7 @@ struct is_function_ptr_helper<R(*)(T0, T1, T2, T3, T4, T5)> { BOOST_STATIC_CONST
template <class R, class T0, class T1, class T2, class T3, class T4, class T5>
struct is_function_ptr_helper<R(*)(T0, T1, T2, T3, T4, T5 ...)> { BOOST_STATIC_CONSTANT(bool, value = true); };
#endif
#if __cpp_noexcept_function_type
#ifdef __cpp_noexcept_function_type
template <class R, class T0, class T1, class T2, class T3, class T4, class T5>
struct is_function_ptr_helper<R(*)(T0, T1, T2, T3, T4, T5)noexcept> { BOOST_STATIC_CONSTANT(bool, value = true); };
#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING
@ -147,7 +147,7 @@ struct is_function_ptr_helper<R(*)(T0, T1, T2, T3, T4, T5, T6)> { BOOST_STATIC_C
template <class R, class T0, class T1, class T2, class T3, class T4, class T5, class T6>
struct is_function_ptr_helper<R(*)(T0, T1, T2, T3, T4, T5, T6 ...)> { BOOST_STATIC_CONSTANT(bool, value = true); };
#endif
#if __cpp_noexcept_function_type
#ifdef __cpp_noexcept_function_type
template <class R, class T0, class T1, class T2, class T3, class T4, class T5, class T6>
struct is_function_ptr_helper<R(*)(T0, T1, T2, T3, T4, T5, T6)noexcept> { BOOST_STATIC_CONSTANT(bool, value = true); };
#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING
@ -161,7 +161,7 @@ struct is_function_ptr_helper<R(*)(T0, T1, T2, T3, T4, T5, T6, T7)> { BOOST_STAT
template <class R, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7>
struct is_function_ptr_helper<R(*)(T0, T1, T2, T3, T4, T5, T6, T7 ...)> { BOOST_STATIC_CONSTANT(bool, value = true); };
#endif
#if __cpp_noexcept_function_type
#ifdef __cpp_noexcept_function_type
template <class R, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7>
struct is_function_ptr_helper<R(*)(T0, T1, T2, T3, T4, T5, T6, T7)noexcept> { BOOST_STATIC_CONSTANT(bool, value = true); };
#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING
@ -175,7 +175,7 @@ struct is_function_ptr_helper<R(*)(T0, T1, T2, T3, T4, T5, T6, T7, T8)> { BOOST_
template <class R, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8>
struct is_function_ptr_helper<R(*)(T0, T1, T2, T3, T4, T5, T6, T7, T8 ...)> { BOOST_STATIC_CONSTANT(bool, value = true); };
#endif
#if __cpp_noexcept_function_type
#ifdef __cpp_noexcept_function_type
template <class R, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8>
struct is_function_ptr_helper<R(*)(T0, T1, T2, T3, T4, T5, T6, T7, T8)noexcept> { BOOST_STATIC_CONSTANT(bool, value = true); };
#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING
@ -189,7 +189,7 @@ struct is_function_ptr_helper<R(*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9)> { BO
template <class R, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9>
struct is_function_ptr_helper<R(*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9 ...)> { BOOST_STATIC_CONSTANT(bool, value = true); };
#endif
#if __cpp_noexcept_function_type
#ifdef __cpp_noexcept_function_type
template <class R, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9>
struct is_function_ptr_helper<R(*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9)noexcept> { BOOST_STATIC_CONSTANT(bool, value = true); };
#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING
@ -203,7 +203,7 @@ struct is_function_ptr_helper<R(*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10)>
template <class R, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10>
struct is_function_ptr_helper<R(*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10 ...)> { BOOST_STATIC_CONSTANT(bool, value = true); };
#endif
#if __cpp_noexcept_function_type
#ifdef __cpp_noexcept_function_type
template <class R, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10>
struct is_function_ptr_helper<R(*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10)noexcept> { BOOST_STATIC_CONSTANT(bool, value = true); };
#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING
@ -217,7 +217,7 @@ struct is_function_ptr_helper<R(*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10,
template <class R, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11>
struct is_function_ptr_helper<R(*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11 ...)> { BOOST_STATIC_CONSTANT(bool, value = true); };
#endif
#if __cpp_noexcept_function_type
#ifdef __cpp_noexcept_function_type
template <class R, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11>
struct is_function_ptr_helper<R(*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11)noexcept> { BOOST_STATIC_CONSTANT(bool, value = true); };
#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING
@ -231,7 +231,7 @@ struct is_function_ptr_helper<R(*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10,
template <class R, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12>
struct is_function_ptr_helper<R(*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12 ...)> { BOOST_STATIC_CONSTANT(bool, value = true); };
#endif
#if __cpp_noexcept_function_type
#ifdef __cpp_noexcept_function_type
template <class R, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12>
struct is_function_ptr_helper<R(*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12)noexcept> { BOOST_STATIC_CONSTANT(bool, value = true); };
#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING
@ -245,7 +245,7 @@ struct is_function_ptr_helper<R(*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10,
template <class R, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13>
struct is_function_ptr_helper<R(*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13 ...)> { BOOST_STATIC_CONSTANT(bool, value = true); };
#endif
#if __cpp_noexcept_function_type
#ifdef __cpp_noexcept_function_type
template <class R, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13>
struct is_function_ptr_helper<R(*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13)noexcept> { BOOST_STATIC_CONSTANT(bool, value = true); };
#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING
@ -259,7 +259,7 @@ struct is_function_ptr_helper<R(*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10,
template <class R, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14>
struct is_function_ptr_helper<R(*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 ...)> { BOOST_STATIC_CONSTANT(bool, value = true); };
#endif
#if __cpp_noexcept_function_type
#ifdef __cpp_noexcept_function_type
template <class R, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14>
struct is_function_ptr_helper<R(*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14)noexcept> { BOOST_STATIC_CONSTANT(bool, value = true); };
#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING
@ -273,7 +273,7 @@ struct is_function_ptr_helper<R(*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10,
template <class R, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15>
struct is_function_ptr_helper<R(*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15 ...)> { BOOST_STATIC_CONSTANT(bool, value = true); };
#endif
#if __cpp_noexcept_function_type
#ifdef __cpp_noexcept_function_type
template <class R, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15>
struct is_function_ptr_helper<R(*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15)noexcept> { BOOST_STATIC_CONSTANT(bool, value = true); };
#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING
@ -287,7 +287,7 @@ struct is_function_ptr_helper<R(*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10,
template <class R, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16>
struct is_function_ptr_helper<R(*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16 ...)> { BOOST_STATIC_CONSTANT(bool, value = true); };
#endif
#if __cpp_noexcept_function_type
#ifdef __cpp_noexcept_function_type
template <class R, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16>
struct is_function_ptr_helper<R(*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16)noexcept> { BOOST_STATIC_CONSTANT(bool, value = true); };
#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING
@ -301,7 +301,7 @@ struct is_function_ptr_helper<R(*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10,
template <class R, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17>
struct is_function_ptr_helper<R(*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17 ...)> { BOOST_STATIC_CONSTANT(bool, value = true); };
#endif
#if __cpp_noexcept_function_type
#ifdef __cpp_noexcept_function_type
template <class R, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17>
struct is_function_ptr_helper<R(*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17)noexcept> { BOOST_STATIC_CONSTANT(bool, value = true); };
#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING
@ -315,7 +315,7 @@ struct is_function_ptr_helper<R(*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10,
template <class R, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18>
struct is_function_ptr_helper<R(*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18 ...)> { BOOST_STATIC_CONSTANT(bool, value = true); };
#endif
#if __cpp_noexcept_function_type
#ifdef __cpp_noexcept_function_type
template <class R, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18>
struct is_function_ptr_helper<R(*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18)noexcept> { BOOST_STATIC_CONSTANT(bool, value = true); };
#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING
@ -329,7 +329,7 @@ struct is_function_ptr_helper<R(*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10,
template <class R, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19>
struct is_function_ptr_helper<R(*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 ...)> { BOOST_STATIC_CONSTANT(bool, value = true); };
#endif
#if __cpp_noexcept_function_type
#ifdef __cpp_noexcept_function_type
template <class R, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19>
struct is_function_ptr_helper<R(*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19)noexcept> { BOOST_STATIC_CONSTANT(bool, value = true); };
#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING
@ -343,7 +343,7 @@ struct is_function_ptr_helper<R(*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10,
template <class R, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19, class T20>
struct is_function_ptr_helper<R(*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20 ...)> { BOOST_STATIC_CONSTANT(bool, value = true); };
#endif
#if __cpp_noexcept_function_type
#ifdef __cpp_noexcept_function_type
template <class R, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19, class T20>
struct is_function_ptr_helper<R(*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20)noexcept> { BOOST_STATIC_CONSTANT(bool, value = true); };
#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING
@ -357,7 +357,7 @@ struct is_function_ptr_helper<R(*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10,
template <class R, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19, class T20, class T21>
struct is_function_ptr_helper<R(*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21 ...)> { BOOST_STATIC_CONSTANT(bool, value = true); };
#endif
#if __cpp_noexcept_function_type
#ifdef __cpp_noexcept_function_type
template <class R, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19, class T20, class T21>
struct is_function_ptr_helper<R(*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21)noexcept> { BOOST_STATIC_CONSTANT(bool, value = true); };
#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING
@ -371,7 +371,7 @@ struct is_function_ptr_helper<R(*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10,
template <class R, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19, class T20, class T21, class T22>
struct is_function_ptr_helper<R(*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22 ...)> { BOOST_STATIC_CONSTANT(bool, value = true); };
#endif
#if __cpp_noexcept_function_type
#ifdef __cpp_noexcept_function_type
template <class R, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19, class T20, class T21, class T22>
struct is_function_ptr_helper<R(*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22)noexcept> { BOOST_STATIC_CONSTANT(bool, value = true); };
#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING
@ -385,7 +385,7 @@ struct is_function_ptr_helper<R(*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10,
template <class R, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19, class T20, class T21, class T22, class T23>
struct is_function_ptr_helper<R(*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23 ...)> { BOOST_STATIC_CONSTANT(bool, value = true); };
#endif
#if __cpp_noexcept_function_type
#ifdef __cpp_noexcept_function_type
template <class R, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19, class T20, class T21, class T22, class T23>
struct is_function_ptr_helper<R(*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23)noexcept> { BOOST_STATIC_CONSTANT(bool, value = true); };
#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING
@ -399,7 +399,7 @@ struct is_function_ptr_helper<R(*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10,
template <class R, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19, class T20, class T21, class T22, class T23, class T24>
struct is_function_ptr_helper<R(*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24 ...)> { BOOST_STATIC_CONSTANT(bool, value = true); };
#endif
#if __cpp_noexcept_function_type
#ifdef __cpp_noexcept_function_type
template <class R, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19, class T20, class T21, class T22, class T23, class T24>
struct is_function_ptr_helper<R(*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24)noexcept> { BOOST_STATIC_CONSTANT(bool, value = true); };
#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING
@ -432,7 +432,7 @@ struct is_function_ptr_helper<R (*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T))> {
template <class R BOOST_PP_COMMA_IF(BOOST_PP_COUNTER) BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,class T)>
struct is_function_ptr_helper<R (*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T) ...)> { BOOST_STATIC_CONSTANT(bool, value = true); };
@#endif
@#if __cpp_noexcept_function_type
@#ifdef __cpp_noexcept_function_type
template <class R BOOST_PP_COMMA_IF(BOOST_PP_COUNTER) BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER, class T)>
struct is_function_ptr_helper<R(*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER, T))noexcept> { BOOST_STATIC_CONSTANT(bool, value = true); };
@#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING

View File

@ -67,7 +67,7 @@ template <class R, class T >
struct is_mem_fun_pointer_impl<R(T::*)(...) const volatile> { BOOST_STATIC_CONSTANT(bool, value = true); };
#endif
#endif
#if __cpp_noexcept_function_type
#ifdef __cpp_noexcept_function_type
template <class R, class T >
struct is_mem_fun_pointer_impl<R(T::*)()noexcept> { BOOST_STATIC_CONSTANT(bool, value = true); };
#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING
@ -113,7 +113,7 @@ template <class R, class T, class T0>
struct is_mem_fun_pointer_impl<R(T::*)(T0 ...) const volatile> { BOOST_STATIC_CONSTANT(bool, value = true); };
#endif
#endif
#if __cpp_noexcept_function_type
#ifdef __cpp_noexcept_function_type
template <class R, class T, class T0>
struct is_mem_fun_pointer_impl<R(T::*)(T0)noexcept> { BOOST_STATIC_CONSTANT(bool, value = true); };
#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING
@ -159,7 +159,7 @@ template <class R, class T, class T0, class T1>
struct is_mem_fun_pointer_impl<R(T::*)(T0, T1 ...) const volatile> { BOOST_STATIC_CONSTANT(bool, value = true); };
#endif
#endif
#if __cpp_noexcept_function_type
#ifdef __cpp_noexcept_function_type
template <class R, class T, class T0, class T1>
struct is_mem_fun_pointer_impl<R(T::*)(T0, T1)noexcept> { BOOST_STATIC_CONSTANT(bool, value = true); };
#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING
@ -205,7 +205,7 @@ template <class R, class T, class T0, class T1, class T2>
struct is_mem_fun_pointer_impl<R(T::*)(T0, T1, T2 ...) const volatile> { BOOST_STATIC_CONSTANT(bool, value = true); };
#endif
#endif
#if __cpp_noexcept_function_type
#ifdef __cpp_noexcept_function_type
template <class R, class T, class T0, class T1, class T2>
struct is_mem_fun_pointer_impl<R(T::*)(T0, T1, T2)noexcept> { BOOST_STATIC_CONSTANT(bool, value = true); };
#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING
@ -251,7 +251,7 @@ template <class R, class T, class T0, class T1, class T2, class T3>
struct is_mem_fun_pointer_impl<R(T::*)(T0, T1, T2, T3 ...) const volatile> { BOOST_STATIC_CONSTANT(bool, value = true); };
#endif
#endif
#if __cpp_noexcept_function_type
#ifdef __cpp_noexcept_function_type
template <class R, class T, class T0, class T1, class T2, class T3>
struct is_mem_fun_pointer_impl<R(T::*)(T0, T1, T2, T3)noexcept> { BOOST_STATIC_CONSTANT(bool, value = true); };
#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING
@ -297,7 +297,7 @@ template <class R, class T, class T0, class T1, class T2, class T3, class T4>
struct is_mem_fun_pointer_impl<R(T::*)(T0, T1, T2, T3, T4 ...) const volatile> { BOOST_STATIC_CONSTANT(bool, value = true); };
#endif
#endif
#if __cpp_noexcept_function_type
#ifdef __cpp_noexcept_function_type
template <class R, class T, class T0, class T1, class T2, class T3, class T4>
struct is_mem_fun_pointer_impl<R(T::*)(T0, T1, T2, T3, T4)noexcept> { BOOST_STATIC_CONSTANT(bool, value = true); };
#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING
@ -343,7 +343,7 @@ template <class R, class T, class T0, class T1, class T2, class T3, class T4, cl
struct is_mem_fun_pointer_impl<R(T::*)(T0, T1, T2, T3, T4, T5 ...) const volatile> { BOOST_STATIC_CONSTANT(bool, value = true); };
#endif
#endif
#if __cpp_noexcept_function_type
#ifdef __cpp_noexcept_function_type
template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5>
struct is_mem_fun_pointer_impl<R(T::*)(T0, T1, T2, T3, T4, T5)noexcept> { BOOST_STATIC_CONSTANT(bool, value = true); };
#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING
@ -389,7 +389,7 @@ template <class R, class T, class T0, class T1, class T2, class T3, class T4, cl
struct is_mem_fun_pointer_impl<R(T::*)(T0, T1, T2, T3, T4, T5, T6 ...) const volatile> { BOOST_STATIC_CONSTANT(bool, value = true); };
#endif
#endif
#if __cpp_noexcept_function_type
#ifdef __cpp_noexcept_function_type
template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6>
struct is_mem_fun_pointer_impl<R(T::*)(T0, T1, T2, T3, T4, T5, T6)noexcept> { BOOST_STATIC_CONSTANT(bool, value = true); };
#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING
@ -435,7 +435,7 @@ template <class R, class T, class T0, class T1, class T2, class T3, class T4, cl
struct is_mem_fun_pointer_impl<R(T::*)(T0, T1, T2, T3, T4, T5, T6, T7 ...) const volatile> { BOOST_STATIC_CONSTANT(bool, value = true); };
#endif
#endif
#if __cpp_noexcept_function_type
#ifdef __cpp_noexcept_function_type
template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7>
struct is_mem_fun_pointer_impl<R(T::*)(T0, T1, T2, T3, T4, T5, T6, T7)noexcept> { BOOST_STATIC_CONSTANT(bool, value = true); };
#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING
@ -481,7 +481,7 @@ template <class R, class T, class T0, class T1, class T2, class T3, class T4, cl
struct is_mem_fun_pointer_impl<R(T::*)(T0, T1, T2, T3, T4, T5, T6, T7, T8 ...) const volatile> { BOOST_STATIC_CONSTANT(bool, value = true); };
#endif
#endif
#if __cpp_noexcept_function_type
#ifdef __cpp_noexcept_function_type
template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8>
struct is_mem_fun_pointer_impl<R(T::*)(T0, T1, T2, T3, T4, T5, T6, T7, T8)noexcept> { BOOST_STATIC_CONSTANT(bool, value = true); };
#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING
@ -527,7 +527,7 @@ template <class R, class T, class T0, class T1, class T2, class T3, class T4, cl
struct is_mem_fun_pointer_impl<R(T::*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9 ...) const volatile> { BOOST_STATIC_CONSTANT(bool, value = true); };
#endif
#endif
#if __cpp_noexcept_function_type
#ifdef __cpp_noexcept_function_type
template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9>
struct is_mem_fun_pointer_impl<R(T::*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9)noexcept> { BOOST_STATIC_CONSTANT(bool, value = true); };
#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING
@ -573,7 +573,7 @@ template <class R, class T, class T0, class T1, class T2, class T3, class T4, cl
struct is_mem_fun_pointer_impl<R(T::*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10 ...) const volatile> { BOOST_STATIC_CONSTANT(bool, value = true); };
#endif
#endif
#if __cpp_noexcept_function_type
#ifdef __cpp_noexcept_function_type
template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10>
struct is_mem_fun_pointer_impl<R(T::*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10)noexcept> { BOOST_STATIC_CONSTANT(bool, value = true); };
#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING
@ -619,7 +619,7 @@ template <class R, class T, class T0, class T1, class T2, class T3, class T4, cl
struct is_mem_fun_pointer_impl<R(T::*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11 ...) const volatile> { BOOST_STATIC_CONSTANT(bool, value = true); };
#endif
#endif
#if __cpp_noexcept_function_type
#ifdef __cpp_noexcept_function_type
template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11>
struct is_mem_fun_pointer_impl<R(T::*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11)noexcept> { BOOST_STATIC_CONSTANT(bool, value = true); };
#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING
@ -665,7 +665,7 @@ template <class R, class T, class T0, class T1, class T2, class T3, class T4, cl
struct is_mem_fun_pointer_impl<R(T::*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12 ...) const volatile> { BOOST_STATIC_CONSTANT(bool, value = true); };
#endif
#endif
#if __cpp_noexcept_function_type
#ifdef __cpp_noexcept_function_type
template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12>
struct is_mem_fun_pointer_impl<R(T::*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12)noexcept> { BOOST_STATIC_CONSTANT(bool, value = true); };
#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING
@ -711,7 +711,7 @@ template <class R, class T, class T0, class T1, class T2, class T3, class T4, cl
struct is_mem_fun_pointer_impl<R(T::*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13 ...) const volatile> { BOOST_STATIC_CONSTANT(bool, value = true); };
#endif
#endif
#if __cpp_noexcept_function_type
#ifdef __cpp_noexcept_function_type
template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13>
struct is_mem_fun_pointer_impl<R(T::*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13)noexcept> { BOOST_STATIC_CONSTANT(bool, value = true); };
#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING
@ -757,7 +757,7 @@ template <class R, class T, class T0, class T1, class T2, class T3, class T4, cl
struct is_mem_fun_pointer_impl<R(T::*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 ...) const volatile> { BOOST_STATIC_CONSTANT(bool, value = true); };
#endif
#endif
#if __cpp_noexcept_function_type
#ifdef __cpp_noexcept_function_type
template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14>
struct is_mem_fun_pointer_impl<R(T::*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14)noexcept> { BOOST_STATIC_CONSTANT(bool, value = true); };
#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING
@ -803,7 +803,7 @@ template <class R, class T, class T0, class T1, class T2, class T3, class T4, cl
struct is_mem_fun_pointer_impl<R(T::*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15 ...) const volatile> { BOOST_STATIC_CONSTANT(bool, value = true); };
#endif
#endif
#if __cpp_noexcept_function_type
#ifdef __cpp_noexcept_function_type
template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15>
struct is_mem_fun_pointer_impl<R(T::*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15)noexcept> { BOOST_STATIC_CONSTANT(bool, value = true); };
#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING
@ -849,7 +849,7 @@ template <class R, class T, class T0, class T1, class T2, class T3, class T4, cl
struct is_mem_fun_pointer_impl<R(T::*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16 ...) const volatile> { BOOST_STATIC_CONSTANT(bool, value = true); };
#endif
#endif
#if __cpp_noexcept_function_type
#ifdef __cpp_noexcept_function_type
template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16>
struct is_mem_fun_pointer_impl<R(T::*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16)noexcept> { BOOST_STATIC_CONSTANT(bool, value = true); };
#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING
@ -895,7 +895,7 @@ template <class R, class T, class T0, class T1, class T2, class T3, class T4, cl
struct is_mem_fun_pointer_impl<R(T::*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17 ...) const volatile> { BOOST_STATIC_CONSTANT(bool, value = true); };
#endif
#endif
#if __cpp_noexcept_function_type
#ifdef __cpp_noexcept_function_type
template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17>
struct is_mem_fun_pointer_impl<R(T::*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17)noexcept> { BOOST_STATIC_CONSTANT(bool, value = true); };
#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING
@ -941,7 +941,7 @@ template <class R, class T, class T0, class T1, class T2, class T3, class T4, cl
struct is_mem_fun_pointer_impl<R(T::*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18 ...) const volatile> { BOOST_STATIC_CONSTANT(bool, value = true); };
#endif
#endif
#if __cpp_noexcept_function_type
#ifdef __cpp_noexcept_function_type
template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18>
struct is_mem_fun_pointer_impl<R(T::*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18)noexcept> { BOOST_STATIC_CONSTANT(bool, value = true); };
#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING
@ -987,7 +987,7 @@ template <class R, class T, class T0, class T1, class T2, class T3, class T4, cl
struct is_mem_fun_pointer_impl<R(T::*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 ...) const volatile> { BOOST_STATIC_CONSTANT(bool, value = true); };
#endif
#endif
#if __cpp_noexcept_function_type
#ifdef __cpp_noexcept_function_type
template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19>
struct is_mem_fun_pointer_impl<R(T::*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19)noexcept> { BOOST_STATIC_CONSTANT(bool, value = true); };
#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING
@ -1033,7 +1033,7 @@ template <class R, class T, class T0, class T1, class T2, class T3, class T4, cl
struct is_mem_fun_pointer_impl<R(T::*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20 ...) const volatile> { BOOST_STATIC_CONSTANT(bool, value = true); };
#endif
#endif
#if __cpp_noexcept_function_type
#ifdef __cpp_noexcept_function_type
template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19, class T20>
struct is_mem_fun_pointer_impl<R(T::*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20)noexcept> { BOOST_STATIC_CONSTANT(bool, value = true); };
#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING
@ -1079,7 +1079,7 @@ template <class R, class T, class T0, class T1, class T2, class T3, class T4, cl
struct is_mem_fun_pointer_impl<R(T::*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21 ...) const volatile> { BOOST_STATIC_CONSTANT(bool, value = true); };
#endif
#endif
#if __cpp_noexcept_function_type
#ifdef __cpp_noexcept_function_type
template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19, class T20, class T21>
struct is_mem_fun_pointer_impl<R(T::*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21)noexcept> { BOOST_STATIC_CONSTANT(bool, value = true); };
#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING
@ -1125,7 +1125,7 @@ template <class R, class T, class T0, class T1, class T2, class T3, class T4, cl
struct is_mem_fun_pointer_impl<R(T::*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22 ...) const volatile> { BOOST_STATIC_CONSTANT(bool, value = true); };
#endif
#endif
#if __cpp_noexcept_function_type
#ifdef __cpp_noexcept_function_type
template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19, class T20, class T21, class T22>
struct is_mem_fun_pointer_impl<R(T::*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22)noexcept> { BOOST_STATIC_CONSTANT(bool, value = true); };
#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING
@ -1171,7 +1171,7 @@ template <class R, class T, class T0, class T1, class T2, class T3, class T4, cl
struct is_mem_fun_pointer_impl<R(T::*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23 ...) const volatile> { BOOST_STATIC_CONSTANT(bool, value = true); };
#endif
#endif
#if __cpp_noexcept_function_type
#ifdef __cpp_noexcept_function_type
template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19, class T20, class T21, class T22, class T23>
struct is_mem_fun_pointer_impl<R(T::*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23)noexcept> { BOOST_STATIC_CONSTANT(bool, value = true); };
#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING
@ -1217,7 +1217,7 @@ template <class R, class T, class T0, class T1, class T2, class T3, class T4, cl
struct is_mem_fun_pointer_impl<R(T::*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24 ...) const volatile> { BOOST_STATIC_CONSTANT(bool, value = true); };
#endif
#endif
#if __cpp_noexcept_function_type
#ifdef __cpp_noexcept_function_type
template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19, class T20, class T21, class T22, class T23, class T24>
struct is_mem_fun_pointer_impl<R(T::*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24)noexcept> { BOOST_STATIC_CONSTANT(bool, value = true); };
#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING
@ -1290,7 +1290,7 @@ struct is_mem_fun_pointer_impl<R (T::*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T)
@#endif
@#endif
@#if __cpp_noexcept_function_type
@#ifdef __cpp_noexcept_function_type
template <class R, class T BOOST_PP_COMMA_IF(BOOST_PP_COUNTER) BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER, class T)>
struct is_mem_fun_pointer_impl<R(T::*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER, T))noexcept> { BOOST_STATIC_CONSTANT(bool, value = true); };

View File

@ -0,0 +1,70 @@
#ifndef BOOST_TYPE_TRAITS_DETAIL_IS_SWAPPABLE_CXX_11_HPP_INCLUDED
#define BOOST_TYPE_TRAITS_DETAIL_IS_SWAPPABLE_CXX_11_HPP_INCLUDED
// Copyright 2017 Peter Dimov
// Copyright 2023 Andrey Semashev
//
// Distributed under the Boost Software License, Version 1.0.
// See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt
#include <boost/config.hpp>
#include <boost/config/workaround.hpp>
#include <boost/type_traits/declval.hpp>
#include <boost/type_traits/integral_constant.hpp>
#if __cplusplus >= 201103L || defined(BOOST_DINKUMWARE_STDLIB)
#include <utility> // for std::swap (C++11)
#else
#include <algorithm> // for std::swap (C++98)
#endif
// Intentionally not within boost namespace to avoid implicitly pulling in boost::swap overloads other than through ADL
namespace boost_type_traits_swappable_detail
{
using std::swap;
template<class T, class U, class = decltype(swap(boost::declval<T>(), boost::declval<U>()))> boost::true_type is_swappable_with_impl( int );
template<class T, class U> boost::false_type is_swappable_with_impl( ... );
template<class T, class U>
struct is_swappable_with_helper { typedef decltype( boost_type_traits_swappable_detail::is_swappable_with_impl<T, U>(0) ) type; };
template<class T, class = decltype(swap(boost::declval<T&>(), boost::declval<T&>()))> boost::true_type is_swappable_impl( int );
template<class T> boost::false_type is_swappable_impl( ... );
template<class T>
struct is_swappable_helper { typedef decltype( boost_type_traits_swappable_detail::is_swappable_impl<T>(0) ) type; };
#if !defined(BOOST_NO_CXX11_NOEXCEPT)
#if BOOST_WORKAROUND(BOOST_GCC, < 40700)
// gcc 4.6 ICEs when noexcept operator is used on an invalid expression
template<class T, class U, bool = is_swappable_with_helper<T, U>::type::value>
struct is_nothrow_swappable_with_helper { typedef boost::false_type type; };
template<class T, class U>
struct is_nothrow_swappable_with_helper<T, U, true> { typedef boost::integral_constant<bool, noexcept(swap(boost::declval<T>(), boost::declval<U>()))> type; };
template<class T, bool = is_swappable_helper<T>::type::value>
struct is_nothrow_swappable_helper { typedef boost::false_type type; };
template<class T>
struct is_nothrow_swappable_helper<T, true> { typedef boost::integral_constant<bool, noexcept(swap(boost::declval<T&>(), boost::declval<T&>()))> type; };
#else // BOOST_WORKAROUND(BOOST_GCC, < 40700)
template<class T, class U, bool B = noexcept(swap(boost::declval<T>(), boost::declval<U>()))> boost::integral_constant<bool, B> is_nothrow_swappable_with_impl( int );
template<class T, class U> boost::false_type is_nothrow_swappable_with_impl( ... );
template<class T, class U>
struct is_nothrow_swappable_with_helper { typedef decltype( boost_type_traits_swappable_detail::is_nothrow_swappable_with_impl<T, U>(0) ) type; };
template<class T, bool B = noexcept(swap(boost::declval<T&>(), boost::declval<T&>()))> boost::integral_constant<bool, B> is_nothrow_swappable_impl( int );
template<class T> boost::false_type is_nothrow_swappable_impl( ... );
template<class T>
struct is_nothrow_swappable_helper { typedef decltype( boost_type_traits_swappable_detail::is_nothrow_swappable_impl<T>(0) ) type; };
#endif // BOOST_WORKAROUND(BOOST_GCC, < 40700)
#endif // !defined(BOOST_NO_CXX11_NOEXCEPT)
} // namespace boost_type_traits_swappable_detail
#endif // #ifndef BOOST_TYPE_TRAITS_DETAIL_IS_SWAPPABLE_CXX_11_HPP_INCLUDED

View File

@ -160,7 +160,7 @@
# define BOOST_HAS_TYPE_TRAITS_INTRINSICS
#endif
#if defined(BOOST_CLANG) && defined(__has_feature) && (!(defined(__CUDACC__) && (__CUDACC_VER_MAJOR__ < 11)) || defined(__CUDA__))
#if defined(BOOST_CLANG) && defined(__has_feature) && defined(__has_builtin) && (!(defined(__CUDACC__) && (__CUDACC_VER_MAJOR__ < 11)) || defined(__CUDA__))
//
// Note that these intrinsics are disabled for the CUDA meta-compiler as it appears
// to not support them, even though the underlying clang compiler does so.
@ -183,25 +183,39 @@
# if (!defined(__GLIBCXX__) || (__GLIBCXX__ >= 20080306 && __GLIBCXX__ != 20080519)) && __has_feature(is_empty)
# define BOOST_IS_EMPTY(T) __is_empty(T)
# endif
# if __has_feature(has_trivial_constructor)
# if __has_builtin(__is_trivially_constructible)
# define BOOST_HAS_TRIVIAL_CONSTRUCTOR(T) __is_trivially_constructible(T)
# elif __has_feature(has_trivial_constructor)
# define BOOST_HAS_TRIVIAL_CONSTRUCTOR(T) __has_trivial_constructor(T)
# endif
# if __has_feature(has_trivial_copy)
# if __has_builtin(__is_trivially_copyable)
# define BOOST_HAS_TRIVIAL_COPY(T) (__is_trivially_copyable(T) && !is_reference<T>::value)
# elif __has_feature(has_trivial_copy)
# define BOOST_HAS_TRIVIAL_COPY(T) (__has_trivial_copy(T) && !is_reference<T>::value)
# endif
# if __has_feature(has_trivial_assign)
# if __has_builtin(__is_trivially_assignable)
# define BOOST_HAS_TRIVIAL_ASSIGN(T) (__is_trivially_assignable(T&, const T&) && !is_volatile<T>::value && is_assignable<T&, const T&>::value)
# elif __has_feature(has_trivial_assign)
# define BOOST_HAS_TRIVIAL_ASSIGN(T) (__has_trivial_assign(T) && !is_volatile<T>::value && is_assignable<T&, const T&>::value)
# endif
# if __has_feature(has_trivial_destructor)
# if __has_builtin(__is_trivially_destructible)
# define BOOST_HAS_TRIVIAL_DESTRUCTOR(T) (__is_trivially_destructible(T) && is_destructible<T>::value)
# elif __has_feature(has_trivial_destructor)
# define BOOST_HAS_TRIVIAL_DESTRUCTOR(T) (__has_trivial_destructor(T) && is_destructible<T>::value)
# endif
# if __has_feature(has_nothrow_constructor)
# if __has_builtin(__is_nothrow_constructible)
# define BOOST_HAS_NOTHROW_CONSTRUCTOR(T) (__is_nothrow_constructible(T) && is_default_constructible<T>::value)
# elif __has_feature(has_nothrow_constructor)
# define BOOST_HAS_NOTHROW_CONSTRUCTOR(T) (__has_nothrow_constructor(T) && is_default_constructible<T>::value)
# endif
# if __has_feature(has_nothrow_copy)
# if __has_builtin(__is_nothrow_constructible)
# define BOOST_HAS_NOTHROW_COPY(T) (__is_nothrow_constructible(T, const T&) && !is_volatile<T>::value && !is_reference<T>::value && is_copy_constructible<T>::value)
# elif __has_feature(has_nothrow_copy)
# define BOOST_HAS_NOTHROW_COPY(T) (__has_nothrow_copy(T) && !is_volatile<T>::value && !is_reference<T>::value && is_copy_constructible<T>::value)
# endif
# if __has_feature(has_nothrow_assign)
# if __has_builtin(__is_nothrow_assignable)
# define BOOST_HAS_NOTHROW_ASSIGN(T) (__is_nothrow_assignable(T&, const T&) && !is_volatile<T>::value && is_assignable<T&, const T&>::value)
# elif __has_feature(has_nothrow_assign)
# define BOOST_HAS_NOTHROW_ASSIGN(T) (__has_nothrow_assign(T) && !is_volatile<T>::value && is_assignable<T&, const T&>::value)
# endif
# if __has_feature(has_virtual_destructor)

View File

@ -81,6 +81,9 @@ template<> struct is_integral<char16_t> : public true_type{};
#ifndef BOOST_NO_CXX11_CHAR32_T
template<> struct is_integral<char32_t> : public true_type{};
#endif
#if defined(__cpp_char8_t) && __cpp_char8_t >= 201811L
template<> struct is_integral<char8_t> : public true_type{};
#endif
#endif // non-CodeGear implementation

View File

@ -8,10 +8,9 @@
// http://www.boost.org/LICENSE_1_0.txt
#include <boost/config.hpp>
#include <boost/config/workaround.hpp>
#if defined(BOOST_NO_SFINAE_EXPR) || defined(BOOST_NO_CXX11_NOEXCEPT) || defined(BOOST_NO_CXX11_DECLTYPE) \
|| defined(BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS) || BOOST_WORKAROUND(BOOST_GCC, < 40700)
|| defined(BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS)
#include <boost/type_traits/is_scalar.hpp>
#include <boost/type_traits/is_const.hpp>
@ -28,35 +27,16 @@ template <class T> struct is_nothrow_swappable_with<T, T> : is_nothrow_swappable
#else
#include <boost/type_traits/declval.hpp>
#include <boost/type_traits/integral_constant.hpp>
#include <algorithm>
#include <boost/type_traits/detail/is_swappable_cxx_11.hpp>
namespace boost
{
namespace type_traits_swappable_detail
{
using std::swap;
template<class T, class U, bool B = noexcept(swap(declval<T>(), declval<U>()))> integral_constant<bool, B> is_nothrow_swappable_with_impl( int );
template<class T, class U> false_type is_nothrow_swappable_with_impl( ... );
template<class T, class U>
struct is_nothrow_swappable_with_helper { typedef decltype( type_traits_swappable_detail::is_nothrow_swappable_with_impl<T, U>(0) ) type; };
template<class T, bool B = noexcept(swap(declval<T&>(), declval<T&>()))> integral_constant<bool, B> is_nothrow_swappable_impl( int );
template<class T> false_type is_nothrow_swappable_impl( ... );
template<class T>
struct is_nothrow_swappable_helper { typedef decltype( type_traits_swappable_detail::is_nothrow_swappable_impl<T>(0) ) type; };
} // namespace type_traits_swappable_detail
template<class T, class U> struct is_nothrow_swappable_with: type_traits_swappable_detail::is_nothrow_swappable_with_helper<T, U>::type
template<class T, class U> struct is_nothrow_swappable_with: boost_type_traits_swappable_detail::is_nothrow_swappable_with_helper<T, U>::type
{
};
template<class T> struct is_nothrow_swappable: type_traits_swappable_detail::is_nothrow_swappable_helper<T>::type
template<class T> struct is_nothrow_swappable: boost_type_traits_swappable_detail::is_nothrow_swappable_helper<T>::type
{
};

View File

@ -0,0 +1,92 @@
#ifndef BOOST_TYPE_TRAITS_IS_SWAPPABLE_HPP_INCLUDED
#define BOOST_TYPE_TRAITS_IS_SWAPPABLE_HPP_INCLUDED
// Copyright 2023 Andrey Semashev
//
// Distributed under the Boost Software License, Version 1.0.
// See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt
#include <boost/config.hpp>
#include <boost/config/workaround.hpp>
#if !defined(BOOST_NO_SFINAE_EXPR) && !defined(BOOST_NO_CXX11_DECLTYPE) && !defined(BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS) && \
!(defined(BOOST_DINKUMWARE_STDLIB) && (BOOST_CXX_VERSION < 201703L))
#include <boost/type_traits/detail/is_swappable_cxx_11.hpp>
namespace boost
{
template<class T, class U> struct is_swappable_with : boost_type_traits_swappable_detail::is_swappable_with_helper<T, U>::type
{
};
template<class T> struct is_swappable : boost_type_traits_swappable_detail::is_swappable_helper<T>::type
{
};
} // namespace boost
#elif defined(BOOST_DINKUMWARE_STDLIB) && (BOOST_CXX_VERSION < 201703L) && \
!defined(BOOST_NO_SFINAE_EXPR) && !defined(BOOST_NO_CXX11_DECLTYPE) && !defined(BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS) && !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && \
!defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) && !BOOST_WORKAROUND(BOOST_MSVC, < 1800) // these are required for is_constructible and is_assignable
// MSVC standard library has SFINAE-unfriendly std::swap in C++ modes prior to C++17,
// so we have to reproduce the restrictions on std::swap that are in effect in C++17 mode.
#include <cstddef>
#include <boost/type_traits/negation.hpp>
#include <boost/type_traits/conjunction.hpp>
#include <boost/type_traits/integral_constant.hpp>
#include <boost/type_traits/is_constructible.hpp>
#include <boost/type_traits/is_assignable.hpp>
#include <boost/type_traits/is_const.hpp>
#include <boost/type_traits/detail/is_swappable_cxx_11.hpp>
namespace boost
{
template<class T> struct is_swappable
: boost::conjunction<
boost::negation< boost::is_const<T> >,
boost::is_constructible<T, T&&>,
boost::is_assignable<T&, T&&>
>::type {};
template<> struct is_swappable<void> : false_type {};
template<> struct is_swappable<const void> : false_type {};
template<> struct is_swappable<volatile void> : false_type {};
template<> struct is_swappable<const volatile void> : false_type {};
template<class T> struct is_swappable<T[]> : false_type {};
template<class T> struct is_swappable<T(&)[]> : false_type {};
template<class T, std::size_t N> struct is_swappable<T[N]> : is_swappable<T> {};
template<class T, std::size_t N> struct is_swappable<T(&)[N]> : is_swappable<T> {};
template<class T, class U> struct is_swappable_with : boost_type_traits_swappable_detail::is_swappable_with_helper<T, U>::type
{
};
template<class T> struct is_swappable_with<T, T> : is_swappable<T> {};
} // namespace boost
#else
#include <boost/type_traits/is_scalar.hpp>
#include <boost/type_traits/integral_constant.hpp>
namespace boost
{
template<class T> struct is_swappable : boost::is_scalar<T> {};
template<class T> struct is_swappable<const T> : false_type {};
template<class T, class U> struct is_swappable_with : false_type {};
template<class T> struct is_swappable_with<T, T> : is_swappable<T> {};
} // namespace boost
#endif
#endif // #ifndef BOOST_TYPE_TRAITS_IS_SWAPPABLE_HPP_INCLUDED

View File

@ -1,21 +1,21 @@
# copyright John Maddock 2004
# Use, modification and distribution are subject to the
# Boost Software License, Version 1.0. (See accompanying file
# Use, modification and distribution are subject to the
# Boost Software License, Version 1.0. (See accompanying file
# LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
# bring in the rules for testing
import testing ;
import os ;
if [ os.environ CI ]
if [ os.environ CI ]
{
CI_DEFINES = <define>CI_SUPPRESS_KNOWN_ISSUES=1 ;
CI_DEFINES = <define>CI_SUPPRESS_KNOWN_ISSUES=1 ;
}
# type_traits in V1 seem to have two modes: standalone, triggered
# by a command line option, and a regular. For now, just imitate
# regular
# regular
project : requirements
# default to all warnings on:
@ -25,13 +25,14 @@ project : requirements
<toolset>gcc:<cxxflags>-Wno-uninitialized
<toolset>gcc:<cxxflags>-Wno-int-in-bool-context
<toolset>gcc:<cxxflags>-Wno-bool-operation
<toolset>gcc:<cxxflags>-Wundef
<toolset>gcc:<warnings-as-errors>on
<toolset>intel:<warnings-as-errors>on
<toolset>sun:<warnings-as-errors>on
<toolset>msvc:<warnings-as-errors>on
<include>libs/tt2/light/include
$(CI_DEFINES)
;
;
rule all-tests {
local result ;
@ -50,9 +51,9 @@ rule all-tests {
{
result += [ run $(source).cpp : : : <define>BOOST_TT_DISABLE_INTRINSICS : $(source)_no_intrinsics ] ;
}
return $(result) ;
return $(result) ;
}
test-suite type_traits : [ all-tests ] ;

View File

@ -43,7 +43,7 @@ typedef void foo1_t(int);
typedef void foo2_t(int&, double);
typedef void foo3_t(int&, bool, int, int);
typedef void foo4_t(int, bool, int*, int[], int, int, int, int, int);
#if __cpp_noexcept_function_type
#ifdef __cpp_noexcept_function_type
typedef int foo5_t(void)noexcept;
typedef int foo6_t(double)noexcept(false);
typedef int foo7_t(int, double)noexcept(true);

View File

@ -154,5 +154,9 @@ BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_integral<char16_t>::value, true);
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_integral<char32_t>::value, true);
#endif
#if defined(__cpp_char8_t) && __cpp_char8_t >= 201811L
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_integral<char8_t>::value, true);
#endif
TT_TEST_END

View File

@ -1,4 +1,3 @@
// Copyright 2017 Peter Dimov
//
// Distributed under the Boost Software License, Version 1.0.
@ -17,6 +16,12 @@
#include "check_integral_constant.hpp"
#include <utility>
// These conditions should be similar to those in is_nothrow_swappable.hpp
#if defined(BOOST_NO_SFINAE_EXPR) || defined(BOOST_NO_CXX11_NOEXCEPT) || defined(BOOST_NO_CXX11_DECLTYPE) || defined(BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS) \
|| (defined(__GLIBCXX__) && __GLIBCXX__ <= 20120301) // built-in clang++ -std=c++11 on Travis, w/ libstdc++ 4.6
#define BOOST_TYPE_TRAITS_IS_NOTHROW_SWAPPABLE_EMULATED
#endif
struct X
{
};
@ -45,6 +50,44 @@ struct U
void swap(U&, U&) {}
#if !defined(BOOST_TYPE_TRAITS_IS_NOTHROW_SWAPPABLE_EMULATED) && !defined(BOOST_NO_CXX11_DELETED_FUNCTIONS)
namespace test_ns {
// Not swappable using std::swap, but swappable using test_ns::swap
struct only_adl_swappable
{
only_adl_swappable(only_adl_swappable const&) = delete;
only_adl_swappable& operator= (only_adl_swappable const&) = delete;
};
inline void swap(only_adl_swappable&, only_adl_swappable&) BOOST_NOEXCEPT {}
} // namespace test_ns
namespace boost {
namespace type_traits_is_nothrow_swappable_test {
// Some type that is defined within boost namespace and that has a specialized swap overload
struct swappable
{
swappable(swappable const&) = delete;
swappable& operator= (swappable const&) = delete;
};
// This overload should be selected by is_nothrow_swappable
inline void swap(swappable&, swappable&) BOOST_NOEXCEPT {}
} // namespace type_traits_is_nothrow_swappable_test
// Some generic swap implementation, such as the one from Boost.Swap. This overload should *not* be selected by is_nothrow_swappable.
template< typename T1, typename T2 >
inline void swap(T1&, T2&) {}
} // namespace boost
#endif
TT_TEST_BEGIN(is_nothrow_swappable)
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_swappable<int>::value, true);
@ -52,9 +95,7 @@ BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_swappable<int const>::value, fals
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_swappable<int volatile>::value, true);
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_swappable<int const volatile>::value, false);
#if defined(BOOST_NO_SFINAE_EXPR) || defined(BOOST_NO_CXX11_NOEXCEPT) || defined(BOOST_NO_CXX11_DECLTYPE) || defined(BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS) \
|| BOOST_WORKAROUND(BOOST_GCC, < 40700)\
|| (defined(__GLIBCXX__) && __GLIBCXX__ <= 20120301) // built-in clang++ -std=c++11 on Travis, w/ libstdc++ 4.6
#if defined(BOOST_TYPE_TRAITS_IS_NOTHROW_SWAPPABLE_EMULATED)
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_swappable<int[2]>::value, false);
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_swappable<int const[2]>::value, false);
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_swappable<int volatile[2]>::value, false);
@ -71,9 +112,7 @@ BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_swappable<void const>::value, fal
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_swappable<void volatile>::value, false);
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_swappable<void const volatile>::value, false);
#if defined(BOOST_NO_SFINAE_EXPR) || defined(BOOST_NO_CXX11_NOEXCEPT) || defined(BOOST_NO_CXX11_DECLTYPE) || defined(BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS) \
|| BOOST_WORKAROUND(BOOST_GCC, < 40700)\
|| (defined(__GLIBCXX__) && __GLIBCXX__ <= 20120301) // built-in clang++ -std=c++11 on Travis, w/ libstdc++ 4.6
#if defined(BOOST_TYPE_TRAITS_IS_NOTHROW_SWAPPABLE_EMULATED)
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_swappable<X>::value, false);
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_swappable<X const>::value, false);
@ -157,6 +196,30 @@ BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_nothrow_swappable<std::pair<V, int> cons
BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_nothrow_swappable<std::pair<V, int> volatile>::value), false);
BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_nothrow_swappable<std::pair<V, int> const volatile>::value), false);
#if !defined(BOOST_NO_CXX11_DELETED_FUNCTIONS)
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_swappable<test_ns::only_adl_swappable>::value, true);
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_swappable<test_ns::only_adl_swappable const>::value, false);
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_swappable<test_ns::only_adl_swappable volatile>::value, false);
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_swappable<test_ns::only_adl_swappable const volatile>::value, false);
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_swappable<test_ns::only_adl_swappable[2]>::value, true);
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_swappable<test_ns::only_adl_swappable const[2]>::value, false);
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_swappable<test_ns::only_adl_swappable volatile[2]>::value, false);
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_swappable<test_ns::only_adl_swappable const volatile[2]>::value, false);
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_swappable<boost::type_traits_is_nothrow_swappable_test::swappable>::value, true);
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_swappable<boost::type_traits_is_nothrow_swappable_test::swappable const>::value, false);
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_swappable<boost::type_traits_is_nothrow_swappable_test::swappable volatile>::value, false);
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_swappable<boost::type_traits_is_nothrow_swappable_test::swappable const volatile>::value, false);
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_swappable<boost::type_traits_is_nothrow_swappable_test::swappable[2]>::value, true);
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_swappable<boost::type_traits_is_nothrow_swappable_test::swappable const[2]>::value, false);
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_swappable<boost::type_traits_is_nothrow_swappable_test::swappable volatile[2]>::value, false);
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_swappable<boost::type_traits_is_nothrow_swappable_test::swappable const volatile[2]>::value, false);
#endif // !defined(BOOST_NO_CXX11_DELETED_FUNCTIONS)
#endif
TT_TEST_END

231
test/is_swappable_test.cpp Normal file
View File

@ -0,0 +1,231 @@
// Copyright 2023 Andrey Semashev
//
// Distributed under the Boost Software License, Version 1.0.
// See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt
#ifdef TEST_STD
# include <type_traits>
#else
# include <boost/type_traits/is_swappable.hpp>
#endif
#include <boost/config.hpp>
#include "test.hpp"
#include "check_integral_constant.hpp"
#include <utility>
// These conditions should be similar to those in is_swappable.hpp
#if defined(BOOST_DINKUMWARE_STDLIB) && (BOOST_CXX_VERSION < 201703L) && \
!defined(BOOST_NO_SFINAE_EXPR) && !defined(BOOST_NO_CXX11_DECLTYPE) && !defined(BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS) && !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && \
!defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) && !BOOST_WORKAROUND(BOOST_MSVC, < 1800) // these are required for is_constructible and is_assignable
#define BOOST_TYPE_TRAITS_IS_SWAPPABLE_MSVC_EMULATED
#elif defined(BOOST_NO_SFINAE_EXPR) || defined(BOOST_NO_CXX11_DECLTYPE) || defined(BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS)
#define BOOST_TYPE_TRAITS_IS_SWAPPABLE_CXX03_EMULATED
#endif
struct X
{
};
struct Y
{
Y( Y const& ) {}
};
struct Z
{
Z& operator=( Z const& ) { return *this; }
};
struct U
{
};
void swap(U&, U&) {}
#if !defined(BOOST_TYPE_TRAITS_IS_SWAPPABLE_CXX03_EMULATED) && !defined(BOOST_NO_CXX11_DELETED_FUNCTIONS)
struct not_swappable
{
not_swappable(not_swappable const&) = delete;
not_swappable& operator= (not_swappable const&) = delete;
};
namespace test_ns {
// Not swappable using std::swap, but swappable using test_ns::swap
struct only_adl_swappable
{
only_adl_swappable(only_adl_swappable const&) = delete;
only_adl_swappable& operator= (only_adl_swappable const&) = delete;
};
inline void swap(only_adl_swappable&, only_adl_swappable&) BOOST_NOEXCEPT {}
} // namespace test_ns
#endif
TT_TEST_BEGIN(is_swappable)
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_swappable<int>::value, true);
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_swappable<int const>::value, false);
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_swappable<int volatile>::value, true);
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_swappable<int const volatile>::value, false);
#if defined(BOOST_TYPE_TRAITS_IS_SWAPPABLE_CXX03_EMULATED)
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_swappable<int[2]>::value, false);
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_swappable<int const[2]>::value, false);
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_swappable<int volatile[2]>::value, false);
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_swappable<int const volatile[2]>::value, false);
#else
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_swappable<int[2]>::value, true);
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_swappable<int const[2]>::value, false);
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_swappable<int volatile[2]>::value, true);
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_swappable<int const volatile[2]>::value, false);
#endif
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_swappable<void>::value, false);
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_swappable<void const>::value, false);
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_swappable<void volatile>::value, false);
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_swappable<void const volatile>::value, false);
#if defined(BOOST_TYPE_TRAITS_IS_SWAPPABLE_CXX03_EMULATED)
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_swappable<X>::value, false);
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_swappable<X const>::value, false);
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_swappable<X volatile>::value, false);
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_swappable<X const volatile>::value, false);
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_swappable<X[2]>::value, false);
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_swappable<X const[2]>::value, false);
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_swappable<X volatile[2]>::value, false);
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_swappable<X const volatile[2]>::value, false);
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_swappable<Y>::value, false);
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_swappable<Y const>::value, false);
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_swappable<Y volatile>::value, false);
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_swappable<Y const volatile>::value, false);
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_swappable<Y[2]>::value, false);
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_swappable<Y const[2]>::value, false);
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_swappable<Y volatile[2]>::value, false);
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_swappable<Y const volatile[2]>::value, false);
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_swappable<Z>::value, false);
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_swappable<Z const>::value, false);
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_swappable<Z volatile>::value, false);
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_swappable<Z const volatile>::value, false);
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_swappable<Z[2]>::value, false);
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_swappable<Z const[2]>::value, false);
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_swappable<Z volatile[2]>::value, false);
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_swappable<Z const volatile[2]>::value, false);
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_swappable<U>::value, false);
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_swappable<U const>::value, false);
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_swappable<U volatile>::value, false);
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_swappable<U const volatile>::value, false);
BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_swappable<std::pair<X, int> >::value), false);
BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_swappable<std::pair<X, int> const>::value), false);
BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_swappable<std::pair<X, int> volatile>::value), false);
BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_swappable<std::pair<X, int> const volatile>::value), false);
BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_swappable<std::pair<Y, int> >::value), false);
BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_swappable<std::pair<Y, int> const>::value), false);
BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_swappable<std::pair<Y, int> volatile>::value), false);
BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_swappable<std::pair<Y, int> const volatile>::value), false);
#else // defined(BOOST_TYPE_TRAITS_IS_SWAPPABLE_CXX03_EMULATED)
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_swappable<X>::value, true);
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_swappable<X const>::value, false);
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_swappable<X volatile>::value, false);
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_swappable<X const volatile>::value, false);
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_swappable<X[2]>::value, true);
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_swappable<X const[2]>::value, false);
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_swappable<X volatile[2]>::value, false);
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_swappable<X const volatile[2]>::value, false);
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_swappable<Y>::value, true);
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_swappable<Y const>::value, false);
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_swappable<Y volatile>::value, false);
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_swappable<Y const volatile>::value, false);
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_swappable<Y[2]>::value, true);
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_swappable<Y const[2]>::value, false);
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_swappable<Y volatile[2]>::value, false);
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_swappable<Y const volatile[2]>::value, false);
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_swappable<Z>::value, true);
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_swappable<Z const>::value, false);
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_swappable<Z volatile>::value, false);
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_swappable<Z const volatile>::value, false);
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_swappable<Z[2]>::value, true);
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_swappable<Z const[2]>::value, false);
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_swappable<Z volatile[2]>::value, false);
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_swappable<Z const volatile[2]>::value, false);
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_swappable<U>::value, true);
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_swappable<U const>::value, false);
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_swappable<U volatile>::value, false);
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_swappable<U const volatile>::value, false);
BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_swappable<std::pair<X, int> >::value), true);
BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_swappable<std::pair<X, int> const>::value), false);
BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_swappable<std::pair<X, int> volatile>::value), false);
BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_swappable<std::pair<X, int> const volatile>::value), false);
BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_swappable<std::pair<Y, int> >::value), true);
BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_swappable<std::pair<Y, int> const>::value), false);
BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_swappable<std::pair<Y, int> volatile>::value), false);
BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_swappable<std::pair<Y, int> const volatile>::value), false);
#endif // defined(BOOST_TYPE_TRAITS_IS_SWAPPABLE_CXX03_EMULATED)
#if !defined(BOOST_TYPE_TRAITS_IS_SWAPPABLE_CXX03_EMULATED) && !defined(BOOST_NO_CXX11_DELETED_FUNCTIONS)
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_swappable<not_swappable>::value, false);
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_swappable<not_swappable const>::value, false);
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_swappable<not_swappable volatile>::value, false);
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_swappable<not_swappable const volatile>::value, false);
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_swappable<not_swappable[2]>::value, false);
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_swappable<not_swappable const[2]>::value, false);
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_swappable<not_swappable volatile[2]>::value, false);
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_swappable<not_swappable const volatile[2]>::value, false);
#if !defined(BOOST_TYPE_TRAITS_IS_SWAPPABLE_MSVC_EMULATED)
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_swappable<test_ns::only_adl_swappable>::value, true);
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_swappable<test_ns::only_adl_swappable const>::value, false);
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_swappable<test_ns::only_adl_swappable volatile>::value, false);
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_swappable<test_ns::only_adl_swappable const volatile>::value, false);
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_swappable<test_ns::only_adl_swappable[2]>::value, true);
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_swappable<test_ns::only_adl_swappable const[2]>::value, false);
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_swappable<test_ns::only_adl_swappable volatile[2]>::value, false);
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_swappable<test_ns::only_adl_swappable const volatile[2]>::value, false);
#else // !defined(BOOST_TYPE_TRAITS_IS_SWAPPABLE_MSVC_EMULATED)
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_swappable<test_ns::only_adl_swappable>::value, false);
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_swappable<test_ns::only_adl_swappable const>::value, false);
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_swappable<test_ns::only_adl_swappable volatile>::value, false);
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_swappable<test_ns::only_adl_swappable const volatile>::value, false);
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_swappable<test_ns::only_adl_swappable[2]>::value, false);
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_swappable<test_ns::only_adl_swappable const[2]>::value, false);
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_swappable<test_ns::only_adl_swappable volatile[2]>::value, false);
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_swappable<test_ns::only_adl_swappable const volatile[2]>::value, false);
#endif // !defined(BOOST_TYPE_TRAITS_IS_SWAPPABLE_MSVC_EMULATED)
#endif // !defined(BOOST_TYPE_TRAITS_IS_SWAPPABLE_CXX03_EMULATED) && !defined(BOOST_NO_CXX11_DELETED_FUNCTIONS)
TT_TEST_END

View File

@ -193,7 +193,7 @@ struct UDT
int f2();
int f3(int);
int f4(int, float);
#if __cpp_noexcept_function_type
#ifdef __cpp_noexcept_function_type
void f5()noexcept;
int f6(int)noexcept(true);
double f7()noexcept(false);
@ -209,7 +209,7 @@ typedef int (UDT::*mf3)(int);
typedef int (UDT::*mf4)(int, float);
typedef int (UDT::*mp);
typedef int (UDT::*cmf)(int) const;
#if __cpp_noexcept_function_type
#ifdef __cpp_noexcept_function_type
typedef void (UDT::*mf5)()noexcept;
typedef int (UDT::*mf6)(int)noexcept;
typedef double (UDT::*mf7)()noexcept;