Skip to content

Commit 3efd6c0

Browse files
committed
Removing concept checks on fundamental accessors/wrappers.
1 parent cd551ea commit 3efd6c0

File tree

12 files changed

+18
-66
lines changed

12 files changed

+18
-66
lines changed

boost/network/protocol/http/message/wrappers/anchor.hpp

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

10-
#include <boost/concept/requires.hpp>
11-
1210
namespace boost { namespace network { namespace http {
1311

1412
template <class Tag>
@@ -27,12 +25,8 @@ namespace boost { namespace network { namespace http {
2725
};
2826
}
2927

30-
template <class Message>
31-
struct Request;
32-
3328
template <class Tag> inline
34-
BOOST_CONCEPT_REQUIRES(((Request<basic_request<Tag> >)),
35-
(impl::anchor_wrapper<Tag>))
29+
impl::anchor_wrapper<Tag>
3630
anchor(basic_request<Tag> const & request) {
3731
return impl::anchor_wrapper<Tag>(request);
3832
}

boost/network/protocol/http/message/wrappers/body.hpp

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -31,23 +31,16 @@ namespace boost { namespace network { namespace http {
3131

3232
} // namespace impl
3333

34-
template <class R>
35-
struct Response;
36-
37-
template <class R>
38-
struct Request;
39-
4034
template <class Tag>
4135
inline
42-
BOOST_CONCEPT_REQUIRES(((Response<basic_response<Tag> >)),
43-
(typename impl::body_wrapper<basic_response<Tag> >::string_type const))
36+
typename impl::body_wrapper<basic_response<Tag> >::string_type const
4437
body(basic_response<Tag> const & message) {
4538
return impl::body_wrapper<basic_response<Tag> >(message);
4639
}
4740

4841
template <class Tag>
49-
inline BOOST_CONCEPT_REQUIRES(((Request<basic_request<Tag> >)),
50-
(typename impl::body_wrapper<basic_request<Tag> >::string_type const))
42+
inline
43+
typename impl::body_wrapper<basic_request<Tag> >::string_type const
5144
body(basic_request<Tag> const & message) {
5245
return impl::body_wrapper<basic_request<Tag> >(message);
5346
}

boost/network/protocol/http/message/wrappers/helper.hpp

Lines changed: 5 additions & 6 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 <boost/mpl/if.hpp>
10-
#include <boost/concept/requires.hpp>
1110

1211
#ifndef BOOST_NETWORK_DEFINE_HTTP_WRAPPER
1312
#define BOOST_NETWORK_DEFINE_HTTP_WRAPPER(name, accessor, pod_field) \
@@ -48,21 +47,21 @@
4847
: message_(message) {} \
4948
name##_wrapper(name##_wrapper const & other) \
5049
: message_(other.message_) {} \
51-
operator string_type () { \
50+
operator string_type () const { \
5251
return this->get_value(message_); \
5352
} \
5453
}; \
5554
\
5655
template <class Tag> \
57-
inline BOOST_CONCEPT_REQUIRES(((Response<basic_response<Tag> >)), \
58-
(name##_wrapper<basic_response<Tag> > const)) \
56+
inline \
57+
name##_wrapper<basic_response<Tag> > const \
5958
name (basic_response<Tag> const & message) { \
6059
return name##_wrapper<basic_response<Tag> >(message); \
6160
} \
6261
\
6362
template <class Tag> \
64-
inline BOOST_CONCEPT_REQUIRES(((Request<basic_request<Tag> >)), \
65-
(name##_wrapper<basic_request<Tag> > const)) \
63+
inline \
64+
name##_wrapper<basic_request<Tag> > const \
6665
name (basic_request<Tag> const & message) { \
6766
return name##_wrapper<basic_request<Tag> >(message); \
6867
}

boost/network/protocol/http/message/wrappers/host.hpp

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

10-
#include <boost/network/protocol/http/request_concept.hpp>
11-
#include <boost/concept/requires.hpp>
12-
1310
namespace boost { namespace network { namespace http {
1411

1512
template <class Tag>
@@ -35,8 +32,7 @@ namespace boost { namespace network { namespace http {
3532

3633
template <class Tag>
3734
inline
38-
BOOST_CONCEPT_REQUIRES(((Request<basic_request<Tag> >)),
39-
(impl::host_wrapper<Tag>))
35+
impl::host_wrapper<Tag>
4036
host(basic_request<Tag> const & request) {
4137
return impl::host_wrapper<Tag>(request);
4238
}

boost/network/protocol/http/message/wrappers/path.hpp

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

10-
#include <boost/network/protocol/http/request_concept.hpp>
11-
#include <boost/concept/requires.hpp>
12-
1310
namespace boost { namespace network { namespace http {
1411

1512
template <class Tag>
@@ -35,8 +32,7 @@ namespace boost { namespace network { namespace http {
3532

3633
template <class Tag>
3734
inline
38-
BOOST_CONCEPT_REQUIRES(((Request<basic_request<Tag> >)),
39-
(impl::path_wrapper<Tag>))
35+
impl::path_wrapper<Tag>
4036
path(basic_request<Tag> const & request) {
4137
return impl::path_wrapper<Tag>(request);
4238
}

boost/network/protocol/http/message/wrappers/port.hpp

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

10-
#include <boost/network/protocol/http/request_concept.hpp>
11-
#include <boost/concept/requires.hpp>
12-
1310
namespace boost { namespace network { namespace http {
1411

1512
template <class Tag>
@@ -35,8 +32,7 @@ namespace boost { namespace network { namespace http {
3532

3633
template <class Tag>
3734
inline
38-
BOOST_CONCEPT_REQUIRES(((Request<basic_request<Tag> >)),
39-
(impl::port_wrapper<Tag>))
35+
impl::port_wrapper<Tag>
4036
port(basic_request<Tag> const & request) {
4137
return impl::port_wrapper<Tag>(request);
4238
}

boost/network/protocol/http/message/wrappers/protocol.hpp

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

10-
#include <boost/network/protocol/http/request_concept.hpp>
11-
#include <boost/concept/requires.hpp>
12-
1310
namespace boost { namespace network { namespace http {
1411

1512
template <class Tag>
@@ -29,8 +26,7 @@ namespace boost { namespace network { namespace http {
2926
}
3027

3128
template <class Tag> inline
32-
BOOST_CONCEPT_REQUIRES(((Request<basic_request<Tag> >)),
33-
(impl::protocol_wrapper<Tag>))
29+
impl::protocol_wrapper<Tag>
3430
protocol(basic_request<Tag> const & request) {
3531
return impl::protocol_wrapper<Tag>(request);
3632
}

boost/network/protocol/http/message/wrappers/query.hpp

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

10-
#include <boost/network/protocol/http/request_concept.hpp>
11-
#include <boost/concept/requires.hpp>
12-
1310
namespace boost { namespace network { namespace http {
1411

1512
template <class Tag>
@@ -36,8 +33,7 @@ namespace boost { namespace network { namespace http {
3633

3734
template <class Tag>
3835
inline
39-
BOOST_CONCEPT_REQUIRES (((Request<basic_request<Tag> >)),
40-
(impl::query_wrapper<Tag>))
36+
impl::query_wrapper<Tag>
4137
query(basic_request<Tag> const & request) {
4238
return impl::query_wrapper<Tag>(request);
4339
}

boost/network/protocol/http/message/wrappers/status.hpp

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

1010
#include <boost/cstdint.hpp>
11-
#include <boost/concept/requires.hpp>
1211

1312
namespace boost { namespace network { namespace http {
1413

@@ -41,8 +40,7 @@ namespace boost { namespace network { namespace http {
4140

4241
template <class Tag>
4342
inline
44-
BOOST_CONCEPT_REQUIRES(((Response<basic_response<Tag> >)),
45-
(impl::status_wrapper<Tag>))
43+
impl::status_wrapper<Tag>
4644
status(basic_response<Tag> const & response) {
4745
return impl::status_wrapper<Tag>(response);
4846
}

boost/network/protocol/http/message/wrappers/status_message.hpp

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

10-
#include <boost/concept/requires.hpp>
11-
1210
namespace boost { namespace network { namespace http {
1311

1412
template <class Tag>
@@ -39,9 +37,7 @@ namespace boost { namespace network { namespace http {
3937

4038
template <class Tag>
4139
inline
42-
BOOST_CONCEPT_REQUIRES(
43-
((Response<basic_response<Tag> >)),
44-
(impl::status_message_wrapper<Tag>))
40+
impl::status_message_wrapper<Tag>
4541
status_message(basic_response<Tag> const & response) {
4642
return impl::status_message_wrapper<Tag>(response);
4743
}

0 commit comments

Comments
 (0)