diff --git a/include/boost/http_proto/detail/impl/workspace.hpp b/include/boost/http_proto/detail/impl/workspace.hpp index 04d38b1d..a192f42d 100644 --- a/include/boost/http_proto/detail/impl/workspace.hpp +++ b/include/boost/http_proto/detail/impl/workspace.hpp @@ -112,15 +112,6 @@ emplace(Args&&... args) -> return p->u; } -template -auto -workspace:: -push(T&& t) -> - typename std::decay::type& -{ - return emplace(std::forward(t)); -} - template T* workspace:: diff --git a/include/boost/http_proto/detail/workspace.hpp b/include/boost/http_proto/detail/workspace.hpp index 33df366f..96794972 100644 --- a/include/boost/http_proto/detail/workspace.hpp +++ b/include/boost/http_proto/detail/workspace.hpp @@ -132,10 +132,6 @@ class workspace typename std::decay::type& emplace(Args&&... args); - template - typename std::decay::type& - push(T&& t); - template T* push_array( diff --git a/include/boost/http_proto/impl/parser.hpp b/include/boost/http_proto/impl/parser.hpp index 80c8863a..60ab7e91 100644 --- a/include/boost/http_proto/impl/parser.hpp +++ b/include/boost/http_proto/impl/parser.hpp @@ -52,11 +52,10 @@ set_body( if(! got_header()) detail::throw_logic_error(); - auto& dyn = ws_.push( + auto& dyn = ws_.emplace< buffers::any_dynamic_buffer_impl::type, - buffers_N>(std::forward< - ElasticBuffer>(eb))); + buffers_N>>(std::forward(eb)); eb_ = &dyn; how_ = how::elastic; on_set_body(); @@ -81,10 +80,10 @@ set_body( if(! got_header()) detail::throw_logic_error(); - auto& dyn = ws_.push( + auto& dyn = ws_.emplace< buffers::any_dynamic_buffer_impl::type&, - buffers_N>(eb)); + buffers_N>>(eb); eb_ = &dyn; how_ = how::elastic; on_set_body(); @@ -109,7 +108,7 @@ set_body( if(! got_header()) detail::throw_logic_error(); - auto& s = ws_.push( + auto& s = ws_.emplace( std::forward(sink)); sink_ = &s; how_ = how::sink; diff --git a/include/boost/http_proto/impl/serializer.hpp b/include/boost/http_proto/impl/serializer.hpp index 10068be5..c54a55c6 100644 --- a/include/boost/http_proto/impl/serializer.hpp +++ b/include/boost/http_proto/impl/serializer.hpp @@ -74,8 +74,8 @@ start( { start_init(m); auto const& bs = - ws_.push(std::forward< - ConstBufferSequence>(body)); + ws_.emplace( + std::forward(body)); std::size_t n = std::distance( buffers::begin(bs), buffers::end(bs));