Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit60af89c

Browse files
committed
Adding inheritance hierarchy for asynchronous tags, and a support metafunction that checks if a tag is asynchronous.
1 parent204a037 commit60af89c

File tree

2 files changed

+30
-0
lines changed

2 files changed

+30
-0
lines changed

‎boost/network/support/is_async.hpp‎

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#ifndef BOOST_NETWORK_SUPPORT_IS_ASYNC_HPP_20100608
2+
#defineBOOST_NETWORK_SUPPORT_IS_ASYNC_HPP_20100608
3+
4+
// Copyright 2010 (c) Dean Michael Berris
5+
// Copyright 2010 (c) Sinefunc, Inc.
6+
// Distributed under the Boost Software License, Version 1.0.
7+
// (See accompanying file LICENSE_1_0.txt or copy at
8+
// http://www.boost.org/LICENSE_1_0.txt)
9+
10+
#include<boost/network/tags.hpp>
11+
#include<boost/type_traits/is_base_of.hpp>
12+
13+
namespaceboost {namespacenetwork {
14+
15+
template<classTag>
16+
structis_async :
17+
is_base_of<
18+
tags::async,
19+
Tag
20+
>
21+
{};
22+
23+
}// namespace network
24+
25+
}// namespace boost
26+
27+
#endif//BOOST_NETWORK_SUPPORT_IS_ASYNC_HPP_2010608

‎boost/network/tags.hpp‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,16 @@
1010

1111
namespaceboost {namespacenetwork {namespacetags {
1212

13+
structasync {};
14+
1315
structdefault_string {};
1416
structdefault_wstring {};
1517
structhttp_default_8bit_tcp_resolve {};
1618
structhttp_default_8bit_udp_resolve {};
1719
structhttp_keepalive_8bit_tcp_resolve {};
1820
structhttp_keepalive_8bit_udp_resolve {};
1921
structhttp_server {};
22+
structhttp_async_8bit_udp_resolve : async {};
2023

2124
typedef default_string default_;
2225

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp