From cf8182794a7d31a17e188fdef0995e33c7abcf1b Mon Sep 17 00:00:00 2001 From: Vinnie Falco Date: Tue, 8 Aug 2017 07:17:24 -0700 Subject: [PATCH] Boost test matrix fixes --- CHANGELOG.md | 6 +++++ Jamfile | 1 - .../boost/beast/core/detail/type_traits.hpp | 6 ++++- .../boost/beast/core/impl/static_buffer.ipp | 24 +++++++++---------- test/beast/http/chunk_encode.cpp | 6 ++--- test/beast/http/message.cpp | 6 ++++- 6 files changed, 31 insertions(+), 18 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 007788cc..24a04d0d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +Version 103: + +* Boost test matrix fixes + +-------------------------------------------------------------------------------- + Version 102: * Section headings in examples diff --git a/Jamfile b/Jamfile index b303014f..c5ab4514 100644 --- a/Jamfile +++ b/Jamfile @@ -101,7 +101,6 @@ project /boost/beast BOOST_ASIO_NO_DEPRECATED=1 gcc:-std=c++11 clang:-std=c++11 - clang:-Wrange-loop-analysis msvc:_SCL_SECURE_NO_WARNINGS=1 msvc:_CRT_SECURE_NO_WARNINGS=1 msvc:"/permissive- /bigobj" diff --git a/include/boost/beast/core/detail/type_traits.hpp b/include/boost/beast/core/detail/type_traits.hpp index 65c27e8f..8401fa74 100644 --- a/include/boost/beast/core/detail/type_traits.hpp +++ b/include/boost/beast/core/detail/type_traits.hpp @@ -232,7 +232,11 @@ constexpr typename unwidest_unsigned::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::type; + return u0 < u1 ? + static_cast(min_all(u0, un...)) : + static_cast(min_all(u1, un...)); } template diff --git a/include/boost/beast/core/impl/static_buffer.ipp b/include/boost/beast/core/impl/static_buffer.ipp index b975f121..36c59daf 100644 --- a/include/boost/beast/core/impl/static_buffer.ipp +++ b/include/boost/beast/core/impl/static_buffer.ipp @@ -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 diff --git a/test/beast/http/chunk_encode.cpp b/test/beast/http/chunk_encode.cpp index 3e64d77d..174c7f92 100644 --- a/test/beast/http/chunk_encode.cpp +++ b/test/beast/http/chunk_encode.cpp @@ -53,11 +53,11 @@ public: void check(string_view match, Args&&... args) { - T t{std::forward(args)...}; + T t(std::forward(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); } diff --git a/test/beast/http/message.cpp b/test/beast/http/message.cpp index d5c5157f..61079c9f 100644 --- a/test/beast/http/message.cpp +++ b/test/beast/http/message.cpp @@ -28,7 +28,11 @@ public: { bool moved = false; - Arg1() = default; + Arg1(Arg1 const&) = default; + + Arg1() + { + } Arg1(Arg1&& other) {