mirror of
https://github.com/boostorg/beast.git
synced 2025-07-29 20:37:31 +02:00
Tidy up msvc-14 workaround in multi_buffer
This commit is contained in:
@ -1,6 +1,7 @@
|
||||
Version 200
|
||||
|
||||
* Don't include OpenSSL for core snippets
|
||||
* Tidy up msvc-14 workaround in multi_buffer
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
|
@ -133,7 +133,7 @@ public:
|
||||
#endif
|
||||
|
||||
template<class Allocator>
|
||||
template<bool IsMutable>
|
||||
template<bool isMutable>
|
||||
class basic_multi_buffer<Allocator>::readable_bytes
|
||||
{
|
||||
basic_multi_buffer const* b_;
|
||||
@ -149,17 +149,14 @@ class basic_multi_buffer<Allocator>::readable_bytes
|
||||
|
||||
public:
|
||||
using value_type = typename std::conditional<
|
||||
IsMutable,
|
||||
isMutable,
|
||||
net::mutable_buffer,
|
||||
net::const_buffer>::type;
|
||||
|
||||
class const_iterator;
|
||||
|
||||
readable_bytes() = delete;
|
||||
#if ! defined(_MSC_VER) || (_MSC_VER >= 1910)
|
||||
readable_bytes(readable_bytes const&) = default;
|
||||
readable_bytes& operator=(readable_bytes const&) = default;
|
||||
#else
|
||||
#if BOOST_WORKAROUND(BOOST_MSVC, < 1910)
|
||||
readable_bytes(readable_bytes const& other)
|
||||
: b_(other.b_)
|
||||
{
|
||||
@ -170,11 +167,14 @@ public:
|
||||
b_ = other.b_;
|
||||
return *this;
|
||||
}
|
||||
#else
|
||||
readable_bytes(readable_bytes const&) = default;
|
||||
readable_bytes& operator=(readable_bytes const&) = default;
|
||||
#endif
|
||||
|
||||
template<
|
||||
bool IsMutable_ = IsMutable,
|
||||
class = typename std::enable_if<! IsMutable_>::type>
|
||||
bool isMutable_ = isMutable,
|
||||
class = typename std::enable_if<! isMutable_>::type>
|
||||
readable_bytes(
|
||||
readable_bytes<true> const& other) noexcept
|
||||
: b_(other.b_)
|
||||
@ -182,8 +182,8 @@ public:
|
||||
}
|
||||
|
||||
template<
|
||||
bool IsMutable_ = IsMutable,
|
||||
class = typename std::enable_if<! IsMutable_>::type>
|
||||
bool isMutable_ = isMutable,
|
||||
class = typename std::enable_if<! isMutable_>::type>
|
||||
readable_bytes& operator=(
|
||||
readable_bytes<true> const& other) noexcept
|
||||
{
|
||||
@ -209,10 +209,10 @@ public:
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
template<class Allocator>
|
||||
template<bool IsMutable>
|
||||
template<bool isMutable>
|
||||
class
|
||||
basic_multi_buffer<Allocator>::
|
||||
readable_bytes<IsMutable>::
|
||||
readable_bytes<isMutable>::
|
||||
const_iterator
|
||||
{
|
||||
basic_multi_buffer const* b_ = nullptr;
|
||||
@ -416,10 +416,10 @@ public:
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
template<class Allocator>
|
||||
template<bool IsMutable>
|
||||
template<bool isMutable>
|
||||
auto
|
||||
basic_multi_buffer<Allocator>::
|
||||
readable_bytes<IsMutable>::
|
||||
readable_bytes<isMutable>::
|
||||
begin() const noexcept ->
|
||||
const_iterator
|
||||
{
|
||||
@ -427,10 +427,10 @@ begin() const noexcept ->
|
||||
}
|
||||
|
||||
template<class Allocator>
|
||||
template<bool IsMutable>
|
||||
template<bool isMutable>
|
||||
auto
|
||||
basic_multi_buffer<Allocator>::
|
||||
readable_bytes<IsMutable>::
|
||||
readable_bytes<isMutable>::
|
||||
end() const noexcept ->
|
||||
const_iterator
|
||||
{
|
||||
|
@ -79,7 +79,7 @@ class basic_multi_buffer
|
||||
// contains `element` followed by raw storage bytes.
|
||||
class element;
|
||||
|
||||
template<bool IsMutable>
|
||||
template<bool>
|
||||
class readable_bytes;
|
||||
|
||||
using alloc_traits =
|
||||
@ -435,11 +435,17 @@ public:
|
||||
std::size_t
|
||||
capacity() const noexcept;
|
||||
|
||||
/// Returns a constant buffer sequence representing the readable bytes
|
||||
/** Returns a constant buffer sequence representing the readable bytes
|
||||
|
||||
@note The sequence may contain multiple contiguous memory regions.
|
||||
*/
|
||||
const_buffers_type
|
||||
data() const noexcept;
|
||||
|
||||
/// Returns a constant buffer sequence representing the readable bytes
|
||||
/** Returns a constant buffer sequence representing the readable bytes
|
||||
|
||||
@note The sequence may contain multiple contiguous memory regions.
|
||||
*/
|
||||
const_buffers_type
|
||||
cdata() const noexcept
|
||||
{
|
||||
@ -448,8 +454,7 @@ public:
|
||||
|
||||
/** Returns a mutable buffer sequence representing the readable bytes.
|
||||
|
||||
@note The sequence may contain zero or more contiguous memory
|
||||
regions.
|
||||
@note The sequence may contain multiple contiguous memory regions.
|
||||
*/
|
||||
mutable_data_type
|
||||
data() noexcept;
|
||||
|
Reference in New Issue
Block a user