|
8 | 8 | #define __NETWORK_MESSAGE_WRAPPERS_BODY_HPP__
|
9 | 9 |
|
10 | 10 | #include <boost/network/traits/string.hpp>
|
| 11 | +#include <boost/network/detail/wrapper_base.hpp> |
11 | 12 |
|
12 | 13 | namespace boost { namespace network {
|
13 | 14 |
|
14 | 15 | namespace impl {
|
15 | 16 | template <class Tag>
|
16 |
| - struct body_wrapper : public detail::wrapper_base<Tag> { |
| 17 | + struct body_wrapper : public detail::wrapper_base<Tag, basic_message<Tag> > { |
17 | 18 | typedef basic_message<Tag> message_type;
|
18 | 19 | typedef typename string<Tag>::type string_type;
|
| 20 | + typedef detail::wrapper_base<Tag, basic_message<Tag> > wrapper_base; |
19 | 21 |
|
20 | 22 | explicit body_wrapper(basic_message<Tag> & message_)
|
21 |
| - : detail::wrapper_base<Tag>(message_) |
| 23 | + : wrapper_base(message_) |
22 | 24 | { };
|
23 | 25 |
|
24 | 26 | operator string_type () const {
|
25 |
| - return string_type(detail::wrapper_base<Tag>::_message.body()); |
| 27 | + return string_type(wrapper_base::_message.body()); |
26 | 28 | };
|
27 | 29 |
|
28 | 30 | std::size_t size() const {
|
29 |
| - return detail::wrapper_base<Tag>::_message.body().size(); |
| 31 | + return wrapper_base::_message.body().size(); |
30 | 32 | }
|
31 | 33 | };
|
32 | 34 |
|
33 | 35 | template <class Tag>
|
34 |
| - struct body_wrapper_const : public detail::wrapper_base_const<Tag> { |
| 36 | + struct body_wrapper_const : public detail::wrapper_base_const<Tag, basic_message<Tag> > { |
35 | 37 | typedef basic_message<Tag> message_type;
|
36 | 38 | typedef typename string<Tag>::type string_type;
|
| 39 | + typedef detail::wrapper_base_const<Tag, basic_message<Tag> > wrapper_base; |
37 | 40 |
|
38 | 41 | explicit body_wrapper_const(basic_message<Tag> const & message_)
|
39 |
| - : detail::wrapper_base_const<Tag>(message_) |
| 42 | + : wrapper_base(message_) |
40 | 43 | {};
|
41 | 44 |
|
42 | 45 | operator string_type () const {
|
43 |
| - return string_type(detail::wrapper_base_const<Tag>::_message.body()); |
| 46 | + return string_type(wrapper_base::_message.body()); |
44 | 47 | }
|
45 | 48 |
|
46 | 49 | std::size_t size() const {
|
47 |
| - return detail::wrapper_base<Tag>::_message.body().size(); |
| 50 | + return wrapper_base::_message.body().size(); |
48 | 51 | }
|
49 | 52 | };
|
50 | 53 |
|
|
0 commit comments