Skip to content

Commit 2f06ab5

Browse files
committed
Fix namespace qualification for core::string_view throughout codebase
Use fully qualified boost::core::string_view instead of core::string_view or beast::string_view to ensure correct namespace resolution in nested boost::beast namespace contexts. This fixes compilation errors across all platforms where the compiler was looking for non-existent types like boost::beast::core::string_view. Fixes CI compilation failures in PR boostorg#3058.
1 parent 82d7737 commit 2f06ab5

106 files changed

Lines changed: 596 additions & 596 deletions

File tree

Some content is hidden

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

example/doc/http_examples.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,7 @@ response<empty_body>
376376
do_head_request(
377377
SyncStream& stream,
378378
DynamicBuffer& buffer,
379-
core::string_view target,
379+
boost::core::string_view target,
380380
error_code& ec)
381381
{
382382
// Do some type checking to be a good citizen
@@ -979,7 +979,7 @@ print_chunked_body(
979979
// after each chunk header and also after the last chunk.
980980
auto header_cb =
981981
[&](std::uint64_t size, // Size of the chunk, or zero for the last chunk
982-
core::string_view extensions, // The raw chunk-extensions string. Already validated.
982+
boost::core::string_view extensions, // The raw chunk-extensions string. Already validated.
983983
error_code& ev) // We can set this to indicate an error
984984
{
985985
// Parse the chunk extensions so we can access them easily
@@ -1008,7 +1008,7 @@ print_chunked_body(
10081008
// more times for each piece of a chunk body.
10091009
auto body_cb =
10101010
[&](std::uint64_t remain, // The number of bytes left in this chunk
1011-
core::string_view body, // A buffer holding chunk body data
1011+
boost::core::string_view body, // A buffer holding chunk body data
10121012
error_code& ec) // We can set this to indicate an error
10131013
{
10141014
// If this is the last piece of the chunk body,

include/boost/beast/_experimental/test/impl/stream.ipp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ template<class Executor>
123123
basic_stream<Executor>::
124124
basic_stream(
125125
net::io_context& ioc,
126-
core::string_view s)
126+
boost::core::string_view s)
127127
: in_(detail::stream_service::make_impl(ioc.get_executor(), nullptr))
128128
{
129129
in_->b.commit(net::buffer_copy(
@@ -136,7 +136,7 @@ basic_stream<Executor>::
136136
basic_stream(
137137
net::io_context& ioc,
138138
fail_count& fc,
139-
core::string_view s)
139+
boost::core::string_view s)
140140
: in_(detail::stream_service::make_impl(ioc.get_executor(), &fc))
141141
{
142142
in_->b.commit(net::buffer_copy(
@@ -161,7 +161,7 @@ connect(basic_stream& remote)
161161
}
162162

163163
template<class Executor>
164-
core::string_view
164+
boost::core::string_view
165165
basic_stream<Executor>::
166166
str() const
167167
{
@@ -175,7 +175,7 @@ str() const
175175
template<class Executor>
176176
void
177177
basic_stream<Executor>::
178-
append(core::string_view s)
178+
append(boost::core::string_view s)
179179
{
180180
std::lock_guard<std::mutex> lock{in_->m};
181181
in_->b.commit(net::buffer_copy(

include/boost/beast/_experimental/test/stream.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ class basic_stream
281281
*/
282282
basic_stream(
283283
net::io_context& ioc,
284-
core::string_view s);
284+
boost::core::string_view s);
285285

286286
/** Construct a stream
287287
@@ -301,7 +301,7 @@ class basic_stream
301301
basic_stream(
302302
net::io_context& ioc,
303303
fail_count& fc,
304-
core::string_view s);
304+
boost::core::string_view s);
305305

306306
/// Establish a connection
307307
void
@@ -333,12 +333,12 @@ class basic_stream
333333
}
334334

335335
/// Returns a string view representing the pending input data
336-
core::string_view
336+
boost::core::string_view
337337
str() const;
338338

339339
/// Appends a string to the pending input data
340340
void
341-
append(core::string_view s);
341+
append(boost::core::string_view s);
342342

343343
/// Clear the pending input area
344344
void

include/boost/beast/core/detail/impl/temporary_buffer.ipp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,15 @@ namespace detail {
2323

2424
void
2525
temporary_buffer::
26-
append(core::string_view s)
26+
append(boost::core::string_view s)
2727
{
2828
grow(s.size());
2929
unchecked_append(s);
3030
}
3131

3232
void
3333
temporary_buffer::
34-
append(core::string_view s1, core::string_view s2)
34+
append(boost::core::string_view s1, boost::core::string_view s2)
3535
{
3636
grow(s1.size() + s2.size());
3737
unchecked_append(s1);
@@ -40,7 +40,7 @@ append(core::string_view s1, core::string_view s2)
4040

4141
void
4242
temporary_buffer::
43-
unchecked_append(core::string_view s)
43+
unchecked_append(boost::core::string_view s)
4444
{
4545
auto n = s.size();
4646
std::memcpy(&data_[size_], s.data(), n);

include/boost/beast/core/detail/static_ostream.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ class static_ostream_buffer
5050
{
5151
}
5252

53-
core::string_view
53+
boost::core::string_view
5454
str() const
5555
{
5656
if(! s_.empty())
@@ -128,7 +128,7 @@ class static_ostream : public std::basic_ostream<char>
128128
imbue(std::locale::classic());
129129
}
130130

131-
core::string_view
131+
boost::core::string_view
132132
str() const
133133
{
134134
return osb_.str();

include/boost/beast/core/detail/string.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@ namespace detail {
2222
namespace string_literals {
2323

2424
inline
25-
core::string_view
25+
boost::core::string_view
2626
operator""_sv(char const* p, std::size_t n)
2727
{
28-
return core::string_view{p, n};
28+
return boost::core::string_view{p, n};
2929
}
3030

3131
} // string_literals

include/boost/beast/core/detail/temporary_buffer.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,13 @@ struct temporary_buffer
3232

3333
BOOST_BEAST_DECL
3434
void
35-
append(core::string_view s);
35+
append(boost::core::string_view s);
3636

3737
BOOST_BEAST_DECL
3838
void
39-
append(core::string_view s1, core::string_view s2);
39+
append(boost::core::string_view s1, boost::core::string_view s2);
4040

41-
core::string_view
41+
boost::core::string_view
4242
view() const noexcept
4343
{
4444
return {data_, size_};
@@ -53,7 +53,7 @@ struct temporary_buffer
5353
private:
5454
BOOST_BEAST_DECL
5555
void
56-
unchecked_append(core::string_view s);
56+
unchecked_append(boost::core::string_view s);
5757

5858
BOOST_BEAST_DECL
5959
void

include/boost/beast/core/impl/string.ipp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ namespace beast {
2020

2121
bool
2222
iequals(
23-
beast::string_view lhs,
24-
beast::string_view rhs)
23+
boost::core::string_view lhs,
24+
boost::core::string_view rhs)
2525
{
2626
if(lhs.size() != rhs.size())
2727
return false;
@@ -50,8 +50,8 @@ slow:
5050

5151
bool
5252
iless::operator()(
53-
core::string_view lhs,
54-
core::string_view rhs) const
53+
boost::core::string_view lhs,
54+
boost::core::string_view rhs) const
5555
{
5656
using std::begin;
5757
using std::end;

include/boost/beast/core/impl/string_param.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ print(T const& t)
3030
template<class T>
3131
typename std::enable_if<
3232
! std::is_integral<T>::value &&
33-
! std::is_convertible<T, core::string_view>::value
33+
! std::is_convertible<T, boost::core::string_view>::value
3434
>::type
3535
string_param::
3636
print(T const& t)
@@ -44,7 +44,7 @@ print(T const& t)
4444
inline
4545
void
4646
string_param::
47-
print(core::string_view sv)
47+
print(boost::core::string_view sv)
4848
{
4949
sv_ = sv;
5050
}
@@ -60,7 +60,7 @@ print_1(T const& t)
6060
auto const it = detail::raw_to_string<
6161
char, T, std::char_traits<char>>(
6262
last, sizeof(buf), t);
63-
*os_ << core::string_view{it,
63+
*os_ << boost::core::string_view{it,
6464
static_cast<std::size_t>(last - it)};
6565
}
6666

include/boost/beast/core/string.hpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,24 +27,24 @@ namespace beast {
2727
BOOST_BEAST_DECL
2828
bool
2929
iequals(
30-
beast::string_view lhs,
31-
beast::string_view rhs);
30+
boost::core::string_view lhs,
31+
boost::core::string_view rhs);
3232

3333
/** A case-insensitive less predicate for strings.
3434
3535
The case-comparison operation is defined only for low-ASCII characters.
3636
3737
As of C++14, containers using this class as the `Compare` type will take part
3838
in heterogeneous lookup if the search term is implicitly convertible to
39-
@ref core::string_view.
39+
@ref boost::core::string_view.
4040
*/
4141
struct iless
4242
{
4343
BOOST_BEAST_DECL
4444
bool
4545
operator()(
46-
core::string_view lhs,
47-
core::string_view rhs) const;
46+
boost::core::string_view lhs,
47+
boost::core::string_view rhs) const;
4848

4949
using is_transparent = void;
5050
};
@@ -55,14 +55,14 @@ struct iless
5555
5656
As of C++14, containers using this class as the `Compare` type will take part
5757
in heterogeneous lookup if the search term is implicitly convertible to
58-
@ref core::string_view.
58+
@ref boost::core::string_view.
5959
*/
6060
struct iequal
6161
{
6262
bool
6363
operator()(
64-
core::string_view lhs,
65-
core::string_view rhs) const
64+
boost::core::string_view lhs,
65+
boost::core::string_view rhs) const
6666
{
6767
return iequals(lhs, rhs);
6868
}

0 commit comments

Comments
 (0)