From 7435d3c65f728ad6fc4b93fc2611c70b5693fefa Mon Sep 17 00:00:00 2001 From: Vinnie Falco Date: Tue, 30 May 2017 16:16:20 -0700 Subject: [PATCH] Disable operator<< for buffer_body fix #363 --- CHANGELOG.md | 2 ++ include/beast/http/buffer_body.hpp | 15 +++++++++++++++ 2 files changed, 17 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 75052faa..6b04c2de 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,7 @@ Version 47 +* Disable operator<< for buffer_body + API Changes: * Refactor treatment of request-method diff --git a/include/beast/http/buffer_body.hpp b/include/beast/http/buffer_body.hpp index 17c71b31..d8c5be38 100644 --- a/include/beast/http/buffer_body.hpp +++ b/include/beast/http/buffer_body.hpp @@ -120,6 +120,21 @@ struct buffer_body #endif }; +#if ! BEAST_DOXYGEN + +template +std::ostream& +operator<<(std::ostream& os, message< + isRequest, buffer_body, Fields> const& msg) +{ + static_assert(sizeof(ConstBufferSequence) == -1, + "operator<< is not supported for buffer_body"); +} + +#endif + } // http } // beast