From 929b15f8447df389e03d79d83b87f02b16d6ba80 Mon Sep 17 00:00:00 2001 From: Richard Hodges Date: Wed, 11 Mar 2020 18:13:35 +0100 Subject: [PATCH] Correct buffer_bytes documentation ref #1854 --- CHANGELOG.md | 1 + include/boost/beast/core/buffer_traits.hpp | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 540c40f2..11b0968b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ Version XXX: * Remove CODE_OF_CONDUCT.md * Refactor websocket read +* Correct buffer_bytes documentation -------------------------------------------------------------------------------- diff --git a/include/boost/beast/core/buffer_traits.hpp b/include/boost/beast/core/buffer_traits.hpp index f7b9adae..2f3c7614 100644 --- a/include/boost/beast/core/buffer_traits.hpp +++ b/include/boost/beast/core/buffer_traits.hpp @@ -140,8 +140,8 @@ using buffers_iterator_type = argument-dependent lookup. The call `beast::buffer_bytes(b)` is equivalent to performing: @code - using namespace net; - buffer_bytes(b); + using net::buffer_size; + return buffer_size(b); @endcode In addition this handles types which are convertible to `net::const_buffer`; these are not handled by `net::buffer_size`.