Skip to content

Commit cd551ea

Browse files
committed
Fixing message type forwarding and coupling of tags with the message type.
1 parent b1221f6 commit cd551ea

File tree

4 files changed

+12
-17
lines changed

4 files changed

+12
-17
lines changed

boost/network/include/message.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
//
99
// This is the modular include file for using the basic message type
1010

11+
#include <boost/network/tags.hpp>
1112
#include <boost/network/message.hpp>
1213

1314
#endif // BOOST_NETWORK_INCLUDE_MESSAGE_HPP_

boost/network/message.hpp

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
#ifndef __NETWORK_MESSAGE_HPP__
77
#define __NETWORK_MESSAGE_HPP__
88

9-
#include "boost/network/message_fwd.hpp"
9+
#include <boost/network/message_fwd.hpp>
1010
#include <boost/network/traits/string.hpp>
1111
#include <boost/network/traits/ostringstream.hpp>
1212
#include <boost/network/traits/headers_container.hpp>
@@ -38,7 +38,7 @@ namespace boost { namespace network {
3838
/** The common message type.
3939
*/
4040
template <class Tag>
41-
class basic_message {
41+
struct basic_message {
4242
public:
4343

4444
typedef Tag tag;
@@ -138,9 +138,12 @@ namespace boost { namespace network {
138138
// swap for ADL
139139
left.swap(right);
140140
}
141-
142-
BOOST_CONCEPT_ASSERT((Message<basic_message<boost::network::tags::default_string> >));
143-
BOOST_CONCEPT_ASSERT((Message<basic_message<boost::network::tags::default_wstring> >));
141+
142+
// Commenting this out as we don't need to do this anymore.
143+
// BOOST_CONCEPT_ASSERT((Message<basic_message<boost::network::tags::default_string> >));
144+
// BOOST_CONCEPT_ASSERT((Message<basic_message<boost::network::tags::default_wstring> >));
145+
typedef basic_message<tags::default_string> message;
146+
typedef basic_message<tags::default_wstring> wmessage;
144147

145148
} // namespace network
146149
} // namespace boost

boost/network/message/wrappers/headers.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ namespace boost { namespace network {
2525
};
2626

2727
template <class Tag>
28-
class basic_message;
28+
struct basic_message;
2929

3030
/** headers wrapper for messages.
3131
*

boost/network/message_fwd.hpp

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,12 @@
66
#ifndef __2008817MESSAGE_FWD_INC__
77
# define __2008817MESSAGE_FWD_INC__
88

9-
10-
// Includes
11-
# include <boost/network/tags.hpp>
12-
13-
149
namespace boost {
1510
namespace network {
16-
template <
17-
class Tag
18-
>
19-
class basic_message;
2011

12+
template <class Tag>
13+
struct basic_message;
2114

22-
typedef basic_message<tags::default_string> message;
23-
typedef basic_message<tags::default_wstring> wmessage;
2415
} // namespace boost
2516
} // namespace network
2617

0 commit comments

Comments
 (0)