diff --git a/src/beast/beast/http/headers.h b/src/beast/beast/http/headers.h index e37f338a233..11dde27d2f3 100644 --- a/src/beast/beast/http/headers.h +++ b/src/beast/beast/http/headers.h @@ -89,19 +89,18 @@ class headers : private detail::less headers() = default; - template +#if defined(_MSC_VER) && _MSC_VER <= 1800 headers (headers&& other); + headers& operator= (headers&& other); - template - headers (headers const& other); +#else + headers (headers&& other) = default; + headers& operator= (headers&& other) = default; - template - headers& - operator= (headers&& other); +#endif - template - headers& - operator= (headers const& other); + headers (headers const& other); + headers& operator= (headers const& other); /** Returns an iterator to headers in order of appearance. */ /** @{ */ @@ -184,7 +183,8 @@ less::operator() ( //------------------------------------------------------------------------------ -template +#if defined(_MSC_VER) && _MSC_VER <= 1800 +inline headers::headers (headers&& other) : list_ (std::move(other.list_)) , set_ (std::move(other.set_)) @@ -192,14 +192,7 @@ headers::headers (headers&& other) } -template -headers::headers (headers const& other) -{ - for (auto const& e : other.list_) - append (e.field, e.value); -} - -template +inline headers& headers::operator= (headers&& other) { @@ -207,8 +200,16 @@ headers::operator= (headers&& other) set_ = std::move(other.set_); return *this; } +#endif -template +inline +headers::headers (headers const& other) +{ + for (auto const& e : other.list_) + append (e.field, e.value); +} + +inline headers& headers::operator= (headers const& other) { diff --git a/src/beast/beast/http/message.h b/src/beast/beast/http/message.h index 2af1e18e6e9..9f0ec6a66f5 100644 --- a/src/beast/beast/http/message.h +++ b/src/beast/beast/http/message.h @@ -62,15 +62,18 @@ class message template message(); - template +#if defined(_MSC_VER) && _MSC_VER <= 1800 message (message&& other); - - template message& operator= (message&& other); - // Memberspace - beast::http::headers headers; +#else + message (message&& other) = default; + message& operator= (message&& other) = default; +#endif + + // Memberspaces + beast::http::headers headers; beast::http::body body; bool @@ -198,7 +201,8 @@ message::message() { } -template +#if defined(_MSC_VER) && _MSC_VER <= 1800 +inline message::message (message&& other) : request_ (other.request_) , method_ (std::move(other.method_)) @@ -213,7 +217,7 @@ message::message (message&& other) { } -template +inline message& message::operator= (message&& other) { @@ -229,6 +233,7 @@ message::operator= (message&& other) body = std::move(other.body); return *this; } +#endif //------------------------------------------------------------------------------ diff --git a/src/beast/beast/http/parser.h b/src/beast/beast/http/parser.h index aac178aa385..769f73d92fa 100644 --- a/src/beast/beast/http/parser.h +++ b/src/beast/beast/http/parser.h @@ -46,9 +46,13 @@ class parser : public beast::http::basic_parser message_.get().request(request); } - template - parser& - operator= (parser&& other); +#if defined(_MSC_VER) && _MSC_VER <= 1800 + parser& operator= (parser&& other); + +#else + parser& operator= (parser&& other) = default; + +#endif private: template @@ -118,7 +122,8 @@ class parser : public beast::http::basic_parser //------------------------------------------------------------------------------ -template +#if defined(_MSC_VER) && _MSC_VER <= 1800 +inline parser& parser::operator= (parser&& other) { @@ -126,6 +131,7 @@ parser::operator= (parser&& other) message_ = std::move (other.message_); return *this; } +#endif template void