Boost test matrix fixes

This commit is contained in:
Vinnie Falco
2017-08-08 07:17:24 -07:00
parent 1366302a29
commit cf8182794a
6 changed files with 31 additions and 18 deletions

View File

@ -1,3 +1,9 @@
Version 103:
* Boost test matrix fixes
--------------------------------------------------------------------------------
Version 102:
* Section headings in examples

View File

@ -101,7 +101,6 @@ project /boost/beast
<define>BOOST_ASIO_NO_DEPRECATED=1
<toolset>gcc:<cxxflags>-std=c++11
<toolset>clang:<cxxflags>-std=c++11
<toolset>clang:<cxxflags>-Wrange-loop-analysis
<toolset>msvc:<define>_SCL_SECURE_NO_WARNINGS=1
<toolset>msvc:<define>_CRT_SECURE_NO_WARNINGS=1
<toolset>msvc:<cxxflags>"/permissive- /bigobj"

View File

@ -232,7 +232,11 @@ constexpr
typename unwidest_unsigned<U0, U1, UN...>::type
min_all(U0 u0, U1 u1, UN... un)
{
return u0 < u1? min_all(u0, un...) : min_all(u1, un...);
using type =
typename unwidest_unsigned<U0, U1, UN...>::type;
return u0 < u1 ?
static_cast<type>(min_all(u0, un...)) :
static_cast<type>(min_all(u1, un...));
}
template<class U>

View File

@ -38,11 +38,11 @@ data() const ->
using boost::asio::const_buffer;
if(in_off_ + in_size_ <= capacity_)
return {{
const_buffer{begin_ + in_off_, in_size_},
const_buffer{begin_, 0}}};
{const_buffer{begin_ + in_off_, in_size_}},
{const_buffer{begin_, 0}}}};
return {{
const_buffer{begin_ + in_off_, capacity_ - in_off_},
const_buffer{begin_, in_size_ - (capacity_ - in_off_)}}};
{const_buffer{begin_ + in_off_, capacity_ - in_off_}},
{const_buffer{begin_, in_size_ - (capacity_ - in_off_)}}}};
}
inline
@ -54,11 +54,11 @@ mutable_data() ->
using boost::asio::mutable_buffer;
if(in_off_ + in_size_ <= capacity_)
return {{
mutable_buffer{begin_ + in_off_, in_size_},
mutable_buffer{begin_, 0}}};
{mutable_buffer{begin_ + in_off_, in_size_}},
{mutable_buffer{begin_, 0}}}};
return {{
mutable_buffer{begin_ + in_off_, capacity_ - in_off_},
mutable_buffer{begin_, in_size_ - (capacity_ - in_off_)}}};
{mutable_buffer{begin_ + in_off_, capacity_ - in_off_}},
{mutable_buffer{begin_, in_size_ - (capacity_ - in_off_)}}}};
}
inline
@ -75,11 +75,11 @@ prepare(std::size_t size) ->
auto const out_off = (in_off_ + in_size_) % capacity_;
if(out_off + out_size_ <= capacity_ )
return {{
mutable_buffer{begin_ + out_off, out_size_},
mutable_buffer{begin_, 0}}};
{mutable_buffer{begin_ + out_off, out_size_}},
{mutable_buffer{begin_, 0}}}};
return {{
mutable_buffer{begin_ + out_off, capacity_ - out_off},
mutable_buffer{begin_, out_size_ - (capacity_ - out_off)}}};
{mutable_buffer{begin_ + out_off, capacity_ - out_off}},
{mutable_buffer{begin_, out_size_ - (capacity_ - out_off)}}}};
}
inline

View File

@ -53,11 +53,11 @@ public:
void
check(string_view match, Args&&... args)
{
T t{std::forward<Args>(args)...};
T t(std::forward<Args>(args)...);
BEAST_EXPECT(to_string(t) == match);
T t2{t};
T t2(t);
BEAST_EXPECT(to_string(t2) == match);
T t3{std::move(t2)};
T t3(std::move(t2));
BEAST_EXPECT(to_string(t3) == match);
}

View File

@ -28,7 +28,11 @@ public:
{
bool moved = false;
Arg1() = default;
Arg1(Arg1 const&) = default;
Arg1()
{
}
Arg1(Arg1&& other)
{