Skip to content

Commit 1f387db

Browse files
committed
Merged deanberris:0.12-devel-deprecations-and-refactorings and fixed conflicts in message_test.cpp
2 parents a5030f6 + 7a78eae commit 1f387db

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+299
-821
lines changed

boost/network/constants.hpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,9 @@ struct constants_wide {
126126
};
127127
} // namespace impl
128128

129+
template <class Tag>
130+
struct unsupported_tag;
131+
129132
template <class Tag>
130133
struct constants
131134
: mpl::if_<

boost/network/include/message.hpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,10 @@
88
//
99
// This is the modular include file for using the basic message type
1010

11-
#include <boost/network/tags.hpp>
1211
#include <boost/network/message.hpp>
12+
#include <boost/network/message/directives.hpp>
13+
#include <boost/network/message/transformers.hpp>
14+
#include <boost/network/message/wrappers.hpp>
15+
#include <boost/network/tags.hpp>
1316

1417
#endif // BOOST_NETWORK_INCLUDE_MESSAGE_HPP_

boost/network/message.hpp

Lines changed: 5 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,15 @@
1-
// Copyright Dean Michael Berris 2007.
1+
// Copyright Dean Michael Berris 2007.
2+
// Copyright Google, Inc. 2015
23
// Distributed under the Boost Software License, Version 1.0.
3-
// (See accompanying file LICENSE_1_0.txt or copy at
4-
// http://www.boost.org/LICENSE_1_0.txt)
4+
// (See accompanying file LICENSE_1_0.txt or copy at
5+
// http://www.boost.org/LICENSE_1_0.txt)
56

67
#ifndef BOOST_NETWORK_MESSAGE_HPP__
78
#define BOOST_NETWORK_MESSAGE_HPP__
89

910
#include <boost/network/detail/directive_base.hpp>
1011
#include <boost/network/detail/wrapper_base.hpp>
11-
#include <boost/network/message/directives.hpp>
12-
#include <boost/network/message/message_concept.hpp>
13-
#include <boost/network/message/modifiers/add_header.hpp>
14-
#include <boost/network/message/modifiers/body.hpp>
15-
#include <boost/network/message/modifiers/clear_headers.hpp>
16-
#include <boost/network/message/modifiers/destination.hpp>
17-
#include <boost/network/message/modifiers/remove_header.hpp>
18-
#include <boost/network/message/modifiers/source.hpp>
19-
#include <boost/network/message/transformers.hpp>
20-
#include <boost/network/message/wrappers.hpp>
21-
#include <boost/network/message_fwd.hpp>
12+
#include <boost/network/traits/headers_container.hpp>
2213
#include <boost/network/traits/string.hpp>
2314
#include <boost/utility/enable_if.hpp>
2415

@@ -125,11 +116,6 @@ inline void swap(basic_message<Tag>& left, basic_message<Tag>& right) {
125116
left.swap(right);
126117
}
127118

128-
// Commenting this out as we don't need to do this anymore.
129-
// BOOST_CONCEPT_ASSERT((Message<basic_message<boost::network::tags::default_string>
130-
// >));
131-
// BOOST_CONCEPT_ASSERT((Message<basic_message<boost::network::tags::default_wstring>
132-
// >));
133119
typedef basic_message<tags::default_string> message;
134120
typedef basic_message<tags::default_wstring> wmessage;
135121

boost/network/message/directives.hpp

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11

2-
// Copyright Dean Michael Berris 2007.
2+
// Copyright Dean Michael Berris 2007.
3+
// Copyright Google, Inc. 2015
34
// Distributed under the Boost Software License, Version 1.0.
4-
// (See accompanying file LICENSE_1_0.txt or copy at
5-
// http://www.boost.org/LICENSE_1_0.txt)
5+
// (See accompanying file LICENSE_1_0.txt or copy at
6+
// http://www.boost.org/LICENSE_1_0.txt)
67

7-
#ifndef __NETWORK_MESSAGE_DIRECTIVES_HPP__
8-
#define __NETWORK_MESSAGE_DIRECTIVES_HPP__
8+
#ifndef BOOST_NETWORK_MESSAGE_DIRECTIVES_HPP__
9+
#define BOOST_NETWORK_MESSAGE_DIRECTIVES_HPP__
910

11+
#include <boost/network/message_fwd.hpp>
1012
#include <boost/network/message/directives/detail/string_directive.hpp>
1113
#include <boost/network/message/directives/header.hpp>
1214
#include <boost/network/message/directives/remove_header.hpp>
@@ -33,4 +35,4 @@ BOOST_NETWORK_STRING_DIRECTIVE(body, body_, message.body(body_),
3335

3436
} // namespace boost
3537

36-
#endif // __NETWORK_MESSAGE_DIRECTIVES_HPP__
38+
#endif // BOOST_NETWORK_MESSAGE_DIRECTIVES_HPP__

boost/network/message/message_concept.hpp

Lines changed: 0 additions & 66 deletions
This file was deleted.

boost/network/message/traits/body.hpp

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,21 @@
33
#define BOOST_NETWORK_MESSAGE_TRAITS_BODY_HPP_20100903
44

55
// Copyright Dean Michael Berris 2010.
6+
// Copyright Google, Inc. 2015
67
// Distributed under the Boost Software License, Version 1.0.
78
// (See accompanying file LICENSE_1_0.txt or copy at
89
// http://www.boost.org/LICENSE_1_0.txt)
910

1011
#include <boost/mpl/if.hpp>
11-
#include <boost/network/traits/string.hpp>
1212
#include <boost/network/support/is_async.hpp>
1313
#include <boost/network/support/is_sync.hpp>
14+
#include <boost/network/tags.hpp>
15+
#include <boost/network/traits/string.hpp>
1416
#include <boost/thread/future.hpp>
1517
#include <boost/type_traits/is_same.hpp>
1618

1719
namespace boost {
1820
namespace network {
19-
2021
namespace traits {
2122

2223
template <class Tag>
@@ -26,11 +27,13 @@ template <class Message>
2627
struct body
2728
: mpl::if_<
2829
is_async<typename Message::tag>,
29-
boost::shared_future<typename string<typename Message::tag>::type>,
30+
shared_future<typename string<typename Message::tag>::type>,
3031
typename mpl::if_<
3132
mpl::or_<is_sync<typename Message::tag>,
32-
is_same<typename Message::tag, tags::default_string>,
33-
is_same<typename Message::tag, tags::default_wstring> >,
33+
is_same<typename Message::tag,
34+
::boost::network::tags::default_string>,
35+
is_same<typename Message::tag,
36+
::boost::network::tags::default_wstring> >,
3437
typename string<typename Message::tag>::type,
3538
unsupported_tag<typename Message::tag> >::type> {};
3639

boost/network/message/traits/destination.hpp

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
#include <boost/mpl/if.hpp>
1111
#include <boost/network/support/is_async.hpp>
1212
#include <boost/network/support/is_sync.hpp>
13+
#include <boost/network/tags.hpp>
1314
#include <boost/network/traits/string.hpp>
1415
#include <boost/thread/future.hpp>
1516
#include <boost/type_traits/is_same.hpp>
@@ -24,15 +25,16 @@ struct unsupported_tag;
2425

2526
template <class Message>
2627
struct destination
27-
: mpl::if_<
28-
is_async<typename Message::tag>,
29-
boost::shared_future<typename string<typename Message::tag>::type>,
30-
typename mpl::if_<
31-
mpl::or_<is_sync<typename Message::tag>,
32-
is_same<typename Message::tag, tags::default_string>,
33-
is_same<typename Message::tag, tags::default_wstring> >,
34-
typename string<typename Message::tag>::type,
35-
unsupported_tag<typename Message::tag> >::type> {};
28+
: mpl::if_<is_async<typename Message::tag>,
29+
shared_future<typename string<typename Message::tag>::type>,
30+
typename mpl::if_<
31+
mpl::or_<is_sync<typename Message::tag>,
32+
is_same<typename Message::tag,
33+
::boost::network::tags::default_string>,
34+
is_same<typename Message::tag,
35+
::boost::network::tags::default_wstring> >,
36+
typename string<typename Message::tag>::type,
37+
unsupported_tag<typename Message::tag> >::type> {};
3638

3739
} // namespace traits
3840
} // namespace network

boost/network/message/traits/source.hpp

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
#include <boost/mpl/if.hpp>
1010
#include <boost/network/support/is_async.hpp>
1111
#include <boost/network/support/is_sync.hpp>
12+
#include <boost/network/tags.hpp>
1213
#include <boost/network/traits/string.hpp>
1314
#include <boost/thread/future.hpp>
1415
#include <boost/type_traits/is_same.hpp>
@@ -22,15 +23,16 @@ struct unsupported_tag;
2223

2324
template <class Message>
2425
struct source
25-
: mpl::if_<
26-
is_async<typename Message::tag>,
27-
boost::shared_future<typename string<typename Message::tag>::type>,
28-
typename mpl::if_<
29-
mpl::or_<is_sync<typename Message::tag>,
30-
is_same<typename Message::tag, tags::default_string>,
31-
is_same<typename Message::tag, tags::default_wstring> >,
32-
typename string<typename Message::tag>::type,
33-
unsupported_tag<typename Message::tag> >::type> {};
26+
: mpl::if_<is_async<typename Message::tag>,
27+
shared_future<typename string<typename Message::tag>::type>,
28+
typename mpl::if_<
29+
mpl::or_<is_sync<typename Message::tag>,
30+
is_same<typename Message::tag,
31+
::boost::network::tags::default_string>,
32+
is_same<typename Message::tag,
33+
::boost::network::tags::default_wstring> >,
34+
typename string<typename Message::tag>::type,
35+
unsupported_tag<typename Message::tag> >::type> {};
3436

3537
} // namespace traits
3638
} // namespace network

boost/network/message/transformers/to_lower.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ template <>
3232
struct to_lower_transformer<selectors::source_selector> {
3333
template <class Tag>
3434
void operator()(basic_message<Tag> &message_) const {
35-
boost::to_lower(message_.source());
35+
::boost::to_lower(message_.source());
3636
}
3737

3838
protected:
@@ -43,7 +43,7 @@ template <>
4343
struct to_lower_transformer<selectors::destination_selector> {
4444
template <class Tag>
4545
void operator()(basic_message<Tag> &message_) const {
46-
boost::to_lower(message_.destination());
46+
::boost::to_lower(message_.destination());
4747
}
4848

4949
protected:

boost/network/message/transformers/to_upper.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ template <>
3232
struct to_upper_transformer<selectors::source_selector> {
3333
template <class Tag>
3434
void operator()(basic_message<Tag> &message_) const {
35-
boost::to_upper(message_.source());
35+
::boost::to_upper(message_.source());
3636
}
3737

3838
protected:
@@ -43,7 +43,7 @@ template <>
4343
struct to_upper_transformer<selectors::destination_selector> {
4444
template <class Tag>
4545
void operator()(basic_message<Tag> &message_) const {
46-
boost::to_upper(message_.destination());
46+
::boost::to_upper(message_.destination());
4747
}
4848

4949
protected:

0 commit comments

Comments
 (0)