Skip to content

Commit 63b0149

Browse files
committed
workaround boost.span non-SFINAE friendly constructor
revert when boostorg/core#203 gets merged
1 parent ec8aad9 commit 63b0149

File tree

6 files changed

+27
-19
lines changed

6 files changed

+27
-19
lines changed

include/boost/http_proto/impl/sink.hpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,11 @@ write_impl(
5858
while(
5959
p != tmp_end &&
6060
it != end_);
61-
rv += on_write(boost::span<
62-
buffers::const_buffer const>(
63-
tmp, p - tmp),
61+
rv += on_write(
62+
true,
63+
boost::span<
64+
buffers::const_buffer const>(
65+
tmp, p - tmp),
6466
it != end_ || more);
6567
if(rv.ec.failed())
6668
return rv;

include/boost/http_proto/impl/source.hpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,11 @@ read_impl(
5858
while(
5959
p != tmp_end &&
6060
it != end_);
61-
rv += on_read(boost::span<
62-
buffers::mutable_buffer const>(
63-
tmp, p - tmp));
61+
rv += on_read(
62+
true,
63+
boost::span<
64+
buffers::mutable_buffer const>(
65+
tmp, p - tmp));
6466
if(rv.ec.failed())
6567
return rv;
6668
if(rv.finished)

include/boost/http_proto/sink.hpp

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,7 @@ struct BOOST_SYMBOL_VISIBLE
192192
virtual
193193
results
194194
on_write(
195+
bool boost_span_issue_202_workaround,
195196
boost::span<const buffers::const_buffer> bs,
196197
bool more);
197198

@@ -212,13 +213,13 @@ struct BOOST_SYMBOL_VISIBLE
212213
return on_write(b, more);
213214
}
214215

215-
results
216-
write_impl(
217-
boost::span<const buffers::const_buffer> const& bs,
218-
bool more)
219-
{
220-
return on_write(bs, more);
221-
}
216+
// results
217+
// write_impl(
218+
// boost::span<const buffers::const_buffer> const& bs,
219+
// bool more)
220+
// {
221+
// return on_write(bs, more);
222+
// }
222223

223224
template<class T>
224225
results

include/boost/http_proto/source.hpp

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,7 @@ struct BOOST_SYMBOL_VISIBLE
195195
virtual
196196
results
197197
on_read(
198+
bool boost_span_issue_202_workaround,
198199
boost::span<buffers::mutable_buffer const> bs);
199200

200201
private:
@@ -205,12 +206,12 @@ struct BOOST_SYMBOL_VISIBLE
205206
return on_read(b);
206207
}
207208

208-
results
209-
read_impl(
210-
boost::span<buffers::mutable_buffer const> const& bs)
211-
{
212-
return on_read(bs);
213-
}
209+
// results
210+
// read_impl(
211+
// boost::span<buffers::mutable_buffer const> const& bs)
212+
// {
213+
// return on_read(bs);
214+
// }
214215

215216
template<class T>
216217
results

src/sink.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ namespace http_proto {
1515
auto
1616
sink::
1717
on_write(
18+
bool,
1819
boost::span<buffers::const_buffer const> bs,
1920
bool more) ->
2021
results

src/source.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ namespace http_proto {
1616
auto
1717
source::
1818
on_read(
19+
bool,
1920
boost::span<buffers::mutable_buffer const> bs) ->
2021
results
2122
{

0 commit comments

Comments
 (0)