From bc5a3cf59e809ee75bc69e513014eb4200ffb73c Mon Sep 17 00:00:00 2001 From: chris_kohlhoff Date: Wed, 29 Mar 2006 13:00:56 +0000 Subject: [PATCH] Remove incorrect buffer() overloads for std::vector. --- asio/include/asio/buffer.hpp | 28 ---------------------------- 1 file changed, 28 deletions(-) diff --git a/asio/include/asio/buffer.hpp b/asio/include/asio/buffer.hpp index 1471de04..a2035500 100644 --- a/asio/include/asio/buffer.hpp +++ b/asio/include/asio/buffer.hpp @@ -564,34 +564,6 @@ inline const_buffer_container_1 buffer( ? data.size() * sizeof(Pod_Type) : max_size_in_bytes)); } -/// Create a new non-modifiable buffer that represents the given POD vector. -/** - * @note The buffer is invalidated by any vector operation that would also - * invalidate iterators. - */ -template -inline const_buffer_container_1 buffer( - std::vector& data) -{ - return const_buffer_container_1( - const_buffer(&data[0], data.size() * sizeof(Pod_Type))); -} - -/// Create a new non-modifiable buffer that represents the given POD vector. -/** - * @note The buffer is invalidated by any vector operation that would also - * invalidate iterators. - */ -template -inline const_buffer_container_1 buffer( - std::vector& data, std::size_t max_size_in_bytes) -{ - return const_buffer_container_1( - const_buffer(&data[0], - data.size() * sizeof(Pod_Type) < max_size_in_bytes - ? data.size() * sizeof(Pod_Type) : max_size_in_bytes)); -} - /// Create a new non-modifiable buffer that represents the given string. /** * @note The buffer is invalidated by any non-const operation called on the