X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=ceph%2Fsrc%2Fboost%2Fboost%2Fbeast%2Fhttp%2Fmessage.hpp;h=c21e3685f0bf37c84dd9ca5d449d7ea178a8eb1d;hb=92f5a8d42d07f9929ae4fa7e01342fe8d96808a8;hp=0455042786a9993bc6f55ed8d50ffe74c4992ad6;hpb=a0324939f9d0e1905d5df8f57442f09dc70af83d;p=ceph.git diff --git a/ceph/src/boost/boost/beast/http/message.hpp b/ceph/src/boost/boost/beast/http/message.hpp index 045504278..c21e3685f 100644 --- a/ceph/src/boost/boost/beast/http/message.hpp +++ b/ceph/src/boost/boost/beast/http/message.hpp @@ -1,5 +1,5 @@ // -// Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com) +// Copyright (c) 2016-2019 Vinnie Falco (vinnie dot falco at gmail dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -16,8 +16,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include @@ -47,18 +47,19 @@ namespace http { */ #if BOOST_BEAST_DOXYGEN template -struct header : Fields +class header : public Fields #else template -struct header; +class header; template -struct header : Fields +class header : public Fields #endif { +public: static_assert(is_fields::value, - "Fields requirements not met"); + "Fields type requirements not met"); /// Indicates if the header is a request or response. #if BOOST_BEAST_DOXYGEN @@ -128,7 +129,7 @@ struct header : Fields @note This function is only available when `isRequest == true`. - @see @ref method_string + @see method_string */ verb method() const; @@ -151,7 +152,7 @@ struct header : Fields @note This function is only available when `isRequest == true`. - @see @ref method + @see method */ string_view method_string() const; @@ -222,14 +223,14 @@ struct header : Fields ! std::is_convertible::type, verb>::value && ! std::is_convertible::type, header>::value + std::decay::type, status>::value >::type> explicit header(Arg1&& arg1, ArgN&&... argn); private: template - friend struct message; + friend class message; template friend @@ -258,10 +259,11 @@ private: A `header` includes the start-line and header-fields. */ template -struct header : Fields +class header : public Fields { +public: static_assert(is_fields::value, - "Fields requirements not met"); + "Fields type requirements not met"); /// Indicates if the header is a request or response. using is_request = std::false_type; @@ -297,9 +299,11 @@ struct header : Fields template::type, status>::value && + std::decay::type, header>::value && + ! std::is_convertible::type, verb>::value && ! std::is_convertible::type, header>::value + std::decay::type, status>::value >::type> explicit header(Arg1&& arg1, ArgN&&... argn); @@ -418,7 +422,7 @@ struct header : Fields private: #if ! BOOST_BEAST_DOXYGEN template - friend struct message; + friend class message; template friend @@ -487,13 +491,14 @@ using value_type_t = typename T::value_type; field value pairs. */ template -struct message - : header +class message + : public header #if ! BOOST_BEAST_DOXYGEN - , beast::detail::empty_base_optimization< + , boost::empty_value< typename Body::value_type> #endif { +public: /// The base class used to hold the header portion of the message. using header_type = header; @@ -542,11 +547,11 @@ struct message /** Constructor - @param method The request-method to use + @param method The request-method to use. @param target The request-target. - @param version The HTTP-version + @param version The HTTP-version. @note This function is only available when `isRequest == true`. */ @@ -561,11 +566,11 @@ struct message /** Constructor - @param method The request-method to use + @param method The request-method to use. @param target The request-target. - @param version The HTTP-version + @param version The HTTP-version. @param body_arg An argument forwarded to the `body` constructor. @@ -585,11 +590,11 @@ struct message /** Constructor - @param method The request-method to use + @param method The request-method to use. @param target The request-target. - @param version The HTTP-version + @param version The HTTP-version. @param body_arg An argument forwarded to the `body` constructor. @@ -611,9 +616,9 @@ struct message /** Constructor - @param result The status-code for the response + @param result The status-code for the response. - @param version The HTTP-version + @param version The HTTP-version. @note This member is only available when `isRequest == false`. */ @@ -628,9 +633,9 @@ struct message /** Constructor - @param result The status-code for the response + @param result The status-code for the response. - @param version The HTTP-version + @param version The HTTP-version. @param body_arg An argument forwarded to the `body` constructor. @@ -648,9 +653,9 @@ struct message /** Constructor - @param result The status-code for the response + @param result The status-code for the response. - @param version The HTTP-version + @param version The HTTP-version. @param body_arg An argument forwarded to the `body` constructor. @@ -722,7 +727,7 @@ struct message /** Set or clear the chunked Transfer-Encoding - This function will set or removed the "chunked" transfer + This function will set or remove the "chunked" transfer encoding as the last item in the list of encodings in the field. @@ -804,7 +809,7 @@ struct message @li @ref chunked would return `true` @li @ref result returns @ref status::no_content - + @li @ref result returns @ref status::not_modified @li @ref result returns any informational status class (100 to 199) @@ -821,7 +826,7 @@ struct message /** Returns the payload size of the body in octets if possible. - This function invokes the @b Body algorithm to measure + This function invokes the Body algorithm to measure the number of octets in the serialized body container. If there is no body, this will return zero. Otherwise, if the body exists but is not known ahead of time, `boost::none` @@ -862,8 +867,8 @@ struct message #endif body()& noexcept { - return this->beast::detail::empty_base_optimization< - typename Body::value_type>::member(); + return this->boost::empty_value< + typename Body::value_type>::get(); } /// Returns the body @@ -875,8 +880,8 @@ struct message body()&& noexcept { return std::move( - this->beast::detail::empty_base_optimization< - typename Body::value_type>::member()); + this->boost::empty_value< + typename Body::value_type>::get()); } /// Returns the body @@ -887,13 +892,13 @@ struct message #endif body() const& noexcept { - return this->beast::detail::empty_base_optimization< - typename Body::value_type>::member(); + return this->boost::empty_value< + typename Body::value_type>::get(); } private: static_assert(is_body::value, - "Body requirements not met"); + "Body type requirements not met"); template< class... BodyArgs, @@ -901,9 +906,9 @@ private: message( std::piecewise_construct_t, std::tuple& body_args, - beast::detail::index_sequence) - : beast::detail::empty_base_optimization< - typename Body::value_type>( + mp11::index_sequence) + : boost::empty_value< + typename Body::value_type>(boost::empty_init_t(), std::forward( std::get(body_args))...) { @@ -919,12 +924,12 @@ private: std::piecewise_construct_t, std::tuple& body_args, std::tuple& fields_args, - beast::detail::index_sequence, - beast::detail::index_sequence) + mp11::index_sequence, + mp11::index_sequence) : header_type(std::forward( std::get(fields_args))...) - , beast::detail::empty_base_optimization< - typename Body::value_type>( + , boost::empty_value< + typename Body::value_type>(boost::empty_init_t(), std::forward( std::get(body_args))...) { @@ -998,6 +1003,6 @@ swap( } // beast } // boost -#include +#include #endif