Skip to content

Commit 5877db3

Browse files
committed
Use std::array::const_iterator instead of raw char pointer.
1 parent 2a159cd commit 5877db3

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

boost/network/protocol/http/client/connection/async_base.hpp

+4-1
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,13 @@
99
// http://www.boost.org/LICENSE_1_0.txt)
1010

1111
#include <functional>
12+
#include <array>
1213
#include <boost/network/protocol/http/client/connection/connection_delegate_factory.hpp>
1314
#include <boost/network/protocol/http/response.hpp>
1415
#include <boost/network/protocol/http/traits/delegate_factory.hpp>
1516
#include <boost/network/protocol/http/client/connection/async_normal.hpp>
1617
#include <boost/network/protocol/http/traits/resolver_policy.hpp>
18+
#include <boost/network/traits/string.hpp>
1719

1820
namespace boost {
1921
namespace network {
@@ -29,7 +31,8 @@ struct async_connection_base {
2931
typedef typename string<Tag>::type string_type;
3032
typedef basic_request<Tag> request;
3133
typedef basic_response<Tag> response;
32-
typedef iterator_range<char const *> char_const_range;
34+
typedef typename std::array<typename char_<Tag>::type, 1024>::const_iterator const_iterator;
35+
typedef iterator_range<const_iterator> char_const_range;
3336
typedef std::function<void(char_const_range const &, std::error_code const &)>
3437
body_callback_function_type;
3538
typedef std::function<bool(string_type &)> body_generator_function_type;

0 commit comments

Comments
 (0)