Function Template optimal_buffer_size

Overview
Headers
Reference

Overview

The function template optimal_buffer_size returns the size of the character buffer which is allocated for a Filter or Device by library streams, stream buffers and chains if no buffer size is explicitly specified.

Headers

<boost/iostreams/optimal_buffer_size.hpp>
<boost/iostreams/operations.hpp>

Reference

Synopsis

namespace boost { namespace iostreams {
              
template<typename T>
std::streamsize optimal_buffer_size(T& t);

} } // End namespace boost::io

Template Parameters

T- A model of Filter or Device.
template<typename T>
std::streamsize optimal_buffer_size(T& t);

The semantics of optimal_buffer_size depends on the category of T as follows:

category_of<T>::typesemantics
convertible to optimally_buffered_tag Returns t.optimal_buffer_size().
convertible to filter_tag but not to optimally_buffered_tag Returns default_filter_buffer_size.
otherwise Returns default_device_buffer_size.