mirror of
https://github.com/boostorg/asio.git
synced 2026-02-20 01:22:07 +00:00
Require C++11 as the minimum c++ standard.
This commit is contained in:
@@ -31,7 +31,7 @@ struct no_set_done
|
||||
|
||||
struct const_member_set_done
|
||||
{
|
||||
void set_done() const BOOST_ASIO_NOEXCEPT
|
||||
void set_done() const noexcept
|
||||
{
|
||||
++call_count;
|
||||
}
|
||||
@@ -46,8 +46,8 @@ namespace traits {
|
||||
template <>
|
||||
struct set_done_member<const const_member_set_done>
|
||||
{
|
||||
BOOST_ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
|
||||
BOOST_ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
|
||||
static constexpr bool is_valid = true;
|
||||
static constexpr bool is_noexcept = true;
|
||||
typedef void result_type;
|
||||
};
|
||||
|
||||
@@ -59,7 +59,7 @@ struct set_done_member<const const_member_set_done>
|
||||
|
||||
struct free_set_done_const_receiver
|
||||
{
|
||||
friend void set_done(const free_set_done_const_receiver&) BOOST_ASIO_NOEXCEPT
|
||||
friend void set_done(const free_set_done_const_receiver&) noexcept
|
||||
{
|
||||
++call_count;
|
||||
}
|
||||
@@ -74,8 +74,8 @@ namespace traits {
|
||||
template <>
|
||||
struct set_done_free<const free_set_done_const_receiver>
|
||||
{
|
||||
BOOST_ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
|
||||
BOOST_ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
|
||||
static constexpr bool is_valid = true;
|
||||
static constexpr bool is_noexcept = true;
|
||||
typedef void result_type;
|
||||
};
|
||||
|
||||
@@ -87,7 +87,7 @@ struct set_done_free<const free_set_done_const_receiver>
|
||||
|
||||
struct non_const_member_set_done
|
||||
{
|
||||
void set_done() BOOST_ASIO_NOEXCEPT
|
||||
void set_done() noexcept
|
||||
{
|
||||
++call_count;
|
||||
}
|
||||
@@ -102,8 +102,8 @@ namespace traits {
|
||||
template <>
|
||||
struct set_done_member<non_const_member_set_done>
|
||||
{
|
||||
BOOST_ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
|
||||
BOOST_ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
|
||||
static constexpr bool is_valid = true;
|
||||
static constexpr bool is_noexcept = true;
|
||||
typedef void result_type;
|
||||
};
|
||||
|
||||
@@ -115,7 +115,7 @@ struct set_done_member<non_const_member_set_done>
|
||||
|
||||
struct free_set_done_non_const_receiver
|
||||
{
|
||||
friend void set_done(free_set_done_non_const_receiver&) BOOST_ASIO_NOEXCEPT
|
||||
friend void set_done(free_set_done_non_const_receiver&) noexcept
|
||||
{
|
||||
++call_count;
|
||||
}
|
||||
@@ -130,8 +130,8 @@ namespace traits {
|
||||
template <>
|
||||
struct set_done_free<free_set_done_non_const_receiver>
|
||||
{
|
||||
BOOST_ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
|
||||
BOOST_ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
|
||||
static constexpr bool is_valid = true;
|
||||
static constexpr bool is_noexcept = true;
|
||||
typedef void result_type;
|
||||
};
|
||||
|
||||
@@ -143,43 +143,43 @@ struct set_done_free<free_set_done_non_const_receiver>
|
||||
|
||||
void test_can_set_done()
|
||||
{
|
||||
BOOST_ASIO_CONSTEXPR bool b1 = exec::can_set_done<
|
||||
constexpr bool b1 = exec::can_set_done<
|
||||
no_set_done&>::value;
|
||||
BOOST_ASIO_CHECK(b1 == false);
|
||||
|
||||
BOOST_ASIO_CONSTEXPR bool b2 = exec::can_set_done<
|
||||
constexpr bool b2 = exec::can_set_done<
|
||||
const no_set_done&>::value;
|
||||
BOOST_ASIO_CHECK(b2 == false);
|
||||
|
||||
BOOST_ASIO_CONSTEXPR bool b3 = exec::can_set_done<
|
||||
constexpr bool b3 = exec::can_set_done<
|
||||
const_member_set_done&>::value;
|
||||
BOOST_ASIO_CHECK(b3 == true);
|
||||
|
||||
BOOST_ASIO_CONSTEXPR bool b4 = exec::can_set_done<
|
||||
constexpr bool b4 = exec::can_set_done<
|
||||
const const_member_set_done&>::value;
|
||||
BOOST_ASIO_CHECK(b4 == true);
|
||||
|
||||
BOOST_ASIO_CONSTEXPR bool b5 = exec::can_set_done<
|
||||
constexpr bool b5 = exec::can_set_done<
|
||||
free_set_done_const_receiver&>::value;
|
||||
BOOST_ASIO_CHECK(b5 == true);
|
||||
|
||||
BOOST_ASIO_CONSTEXPR bool b6 = exec::can_set_done<
|
||||
constexpr bool b6 = exec::can_set_done<
|
||||
const free_set_done_const_receiver&>::value;
|
||||
BOOST_ASIO_CHECK(b6 == true);
|
||||
|
||||
BOOST_ASIO_CONSTEXPR bool b7 = exec::can_set_done<
|
||||
constexpr bool b7 = exec::can_set_done<
|
||||
non_const_member_set_done&>::value;
|
||||
BOOST_ASIO_CHECK(b7 == true);
|
||||
|
||||
BOOST_ASIO_CONSTEXPR bool b8 = exec::can_set_done<
|
||||
constexpr bool b8 = exec::can_set_done<
|
||||
const non_const_member_set_done&>::value;
|
||||
BOOST_ASIO_CHECK(b8 == false);
|
||||
|
||||
BOOST_ASIO_CONSTEXPR bool b9 = exec::can_set_done<
|
||||
constexpr bool b9 = exec::can_set_done<
|
||||
free_set_done_non_const_receiver&>::value;
|
||||
BOOST_ASIO_CHECK(b9 == true);
|
||||
|
||||
BOOST_ASIO_CONSTEXPR bool b10 = exec::can_set_done<
|
||||
constexpr bool b10 = exec::can_set_done<
|
||||
const free_set_done_non_const_receiver&>::value;
|
||||
BOOST_ASIO_CHECK(b10 == false);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user