Skip to content

Commit 2bbd030

Browse files
committed
Cleaned up the string types, and use std::string more explicitly.
1 parent 1d767d2 commit 2bbd030

Some content is hidden

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

69 files changed

+101
-1171
lines changed

boost/network/constants.hpp

Lines changed: 1 addition & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,10 @@
66
// (See accompanying file LICENSE_1_0.txt or copy at
77
// http://www.boost.org/LICENSE_1_0.txt)
88

9-
#include <boost/mpl/if.hpp>
10-
#include <boost/network/support/is_default_string.hpp>
11-
#include <boost/network/support/is_default_wstring.hpp>
12-
139
namespace boost {
1410
namespace network {
15-
16-
namespace impl {
1711
template <class Tag>
18-
struct constants_narrow {
12+
struct constants {
1913

2014
static char const* crlf() {
2115
static char crlf_[] = "\r\n";
@@ -109,29 +103,7 @@ struct constants_narrow {
109103
return https_;
110104
}
111105
};
112-
113-
template <class Tag>
114-
struct constants_wide {
115-
116-
static wchar_t const* https() {
117-
static wchar_t https_[] = L"https";
118-
return https_;
119-
}
120-
};
121-
} // namespace impl
122-
123-
template <class Tag>
124-
struct unsupported_tag;
125-
126-
template <class Tag>
127-
struct constants
128-
: mpl::if_<
129-
is_default_string<Tag>, impl::constants_narrow<Tag>,
130-
typename mpl::if_<is_default_wstring<Tag>, impl::constants_wide<Tag>,
131-
unsupported_tag<Tag> >::type>::type {};
132-
133106
} // namespace network
134-
135107
} // namespace boost
136108

137109
#endif // BOOST_NETWORK_CONSTANTS_HPP_20100808

boost/network/message.hpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
#include <boost/network/detail/directive_base.hpp>
1111
#include <boost/network/detail/wrapper_base.hpp>
1212
#include <boost/network/traits/headers_container.hpp>
13-
#include <boost/network/traits/string.hpp>
1413
#include <boost/utility/enable_if.hpp>
1514

1615
/** message.hpp
@@ -33,7 +32,7 @@ struct basic_message {
3332

3433
typedef typename headers_container<Tag>::type headers_container_type;
3534
typedef typename headers_container_type::value_type header_type;
36-
typedef typename string<Tag>::type string_type;
35+
typedef std::string string_type;
3736

3837
basic_message() = default;
3938
basic_message(const basic_message&) = default;
@@ -117,8 +116,6 @@ inline void swap(basic_message<Tag>& left, basic_message<Tag>& right) {
117116
}
118117

119118
typedef basic_message<tags::default_string> message;
120-
typedef basic_message<tags::default_wstring> wmessage;
121-
122119
} // namespace network
123120
} // namespace boost
124121

boost/network/message/directives/detail/string_directive.hpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
#include <boost/mpl/if.hpp>
1010
#include <boost/mpl/or.hpp>
1111
#include <boost/network/support/is_pod.hpp>
12-
#include <boost/network/traits/string.hpp>
1312
#include <boost/utility/enable_if.hpp>
1413
#include <boost/variant/apply_visitor.hpp>
1514
#include <boost/variant/static_visitor.hpp>

boost/network/message/directives/detail/string_value.hpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
// http://www.boost.org/LICENSE_1_0.txt)
88

99
#include <future>
10-
#include <boost/network/traits/string.hpp>
1110
#include <boost/network/support/is_async.hpp>
1211
#include <boost/network/support/is_sync.hpp>
1312
#include <boost/type_traits/is_same.hpp>
@@ -22,8 +21,7 @@ template <class Tag>
2221
struct string_value
2322
: mpl::if_<is_async<Tag>, std::shared_future<typename string<Tag>::type>,
2423
typename mpl::if_<
25-
mpl::or_<is_sync<Tag>, is_same<Tag, tags::default_string>,
26-
is_same<Tag, tags::default_wstring> >,
24+
mpl::or_<is_sync<Tag>, is_same<Tag, tags::default_string>>,
2725
typename string<Tag>::type, unsupported_tag<Tag> >::type> {};
2826

2927
} /* detail */

boost/network/message/directives/header.hpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
#define BOOST_NETWORK_MESSAGE_DIRECTIVES_HEADER_HPP__
99

1010
#include <boost/network/support/is_async.hpp>
11-
#include <boost/network/traits/string.hpp>
1211
#include <boost/utility/enable_if.hpp>
1312
#include <boost/mpl/if.hpp>
1413
#include <boost/mpl/or.hpp>

boost/network/message/directives/remove_header.hpp

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
#ifndef NETWORK_MESSAGE_DIRECTIVES_REMOVE_HEADER_HPP
88
#define NETWORK_MESSAGE_DIRECTIVES_REMOVE_HEADER_HPP
99

10-
#include <boost/network/traits/string.hpp>
1110
#include <string>
1211

1312
namespace boost {
@@ -38,12 +37,6 @@ inline impl::remove_header_directive<std::string> remove_header(
3837
const std::string& header_name) {
3938
return impl::remove_header_directive<std::string>(header_name);
4039
}
41-
42-
inline impl::remove_header_directive<std::wstring> remove_header(
43-
const std::wstring& header_name) {
44-
return impl::remove_header_directive<std::wstring>(header_name);
45-
}
46-
4740
} // namespace network
4841
} // namespace boost
4942

boost/network/message/traits/body.hpp

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

boost/network/message/traits/destination.hpp

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

boost/network/message/traits/headers.hpp

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

boost/network/message/traits/source.hpp

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

0 commit comments

Comments
 (0)