diff --git a/CMakeLists.txt b/CMakeLists.txt index f2a921f..7ba7193 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -89,6 +89,7 @@ if(BUILD_SHARED_LIBS) else() target_compile_definitions(boost_buffers PUBLIC BOOST_BUFFERS_STATIC_LINK=1) endif() +target_compile_definitions(boost_buffers PRIVATE BOOST_BUFFERS_SOURCE) if(BOOST_BUFFERS_INSTALL AND NOT BOOST_SUPERPROJECT_VERSION) install(TARGETS boost_buffers diff --git a/include/boost/buffers/any_dynamic_buffer.hpp b/include/boost/buffers/any_dynamic_buffer.hpp index db77b4e..6c5125b 100644 --- a/include/boost/buffers/any_dynamic_buffer.hpp +++ b/include/boost/buffers/any_dynamic_buffer.hpp @@ -22,7 +22,8 @@ namespace buffers { /** An abstract, type-erased dynamic buffer. */ -struct any_dynamic_buffer +struct BOOST_SYMBOL_VISIBLE + any_dynamic_buffer { using const_buffers_type = buffers::const_buffer_span; diff --git a/include/boost/buffers/circular_buffer.hpp b/include/boost/buffers/circular_buffer.hpp index a7ca891..1b301c6 100644 --- a/include/boost/buffers/circular_buffer.hpp +++ b/include/boost/buffers/circular_buffer.hpp @@ -25,7 +25,8 @@ namespace buffers { @ref prepare and @ref data always have length two. */ -class circular_buffer +class BOOST_SYMBOL_VISIBLE + circular_buffer { unsigned char* base_ = nullptr; std::size_t cap_ = 0; @@ -111,19 +112,15 @@ class circular_buffer return cap_ - in_len_; } - BOOST_BUFFERS_DECL const_buffers_type data() const noexcept; - BOOST_BUFFERS_DECL mutable_buffers_type prepare(std::size_t n); - BOOST_BUFFERS_DECL void commit(std::size_t n) noexcept; - BOOST_BUFFERS_DECL void consume(std::size_t n) noexcept; }; diff --git a/include/boost/buffers/const_buffer_pair.hpp b/include/boost/buffers/const_buffer_pair.hpp index e92a6f4..2e73e35 100644 --- a/include/boost/buffers/const_buffer_pair.hpp +++ b/include/boost/buffers/const_buffer_pair.hpp @@ -20,7 +20,8 @@ namespace buffers { /** A constant buffer pair */ -class const_buffer_pair +class BOOST_SYMBOL_VISIBLE + const_buffer_pair { public: using value_type = const_buffer; @@ -117,12 +118,10 @@ class const_buffer_pair #endif private: - BOOST_BUFFERS_DECL const_buffer_pair prefix_impl( std::size_t n) const noexcept; - BOOST_BUFFERS_DECL const_buffer_pair suffix_impl( std::size_t n) const noexcept; diff --git a/include/boost/buffers/const_buffer_span.hpp b/include/boost/buffers/const_buffer_span.hpp index 1e856ba..e5660b3 100644 --- a/include/boost/buffers/const_buffer_span.hpp +++ b/include/boost/buffers/const_buffer_span.hpp @@ -23,7 +23,8 @@ namespace buffers { Objects of this type meet the requirements of ConstBufferSequence. */ -class const_buffer_span +class BOOST_SYMBOL_VISIBLE + const_buffer_span { const_buffer const* p_ = nullptr; std::size_t n_ = 0; diff --git a/include/boost/buffers/const_buffer_subspan.hpp b/include/boost/buffers/const_buffer_subspan.hpp index 7b39a4d..dba293b 100644 --- a/include/boost/buffers/const_buffer_subspan.hpp +++ b/include/boost/buffers/const_buffer_subspan.hpp @@ -25,7 +25,8 @@ class const_buffer_span; Objects of this type meet the requirements of ConstBufferSequence. */ -class const_buffer_subspan +class BOOST_SYMBOL_VISIBLE + const_buffer_subspan { const_buffer const* p_ = nullptr; std::size_t n_ = 0; @@ -55,7 +56,6 @@ class const_buffer_subspan /** Constructor. */ - BOOST_BUFFERS_DECL const_buffer_subspan( const_buffer const* p, std::size_t n) noexcept; @@ -109,10 +109,10 @@ class const_buffer_subspan #endif private: - BOOST_BUFFERS_DECL const_buffer_subspan - prefix_impl(std::size_t n) const noexcept; - BOOST_BUFFERS_DECL const_buffer_subspan - suffix_impl(std::size_t n) const noexcept; + const_buffer_subspan prefix_impl( + std::size_t n) const noexcept; + const_buffer_subspan suffix_impl( + std::size_t n) const noexcept; }; } // buffers diff --git a/include/boost/buffers/flat_buffer.hpp b/include/boost/buffers/flat_buffer.hpp index 2042242..46099e6 100644 --- a/include/boost/buffers/flat_buffer.hpp +++ b/include/boost/buffers/flat_buffer.hpp @@ -18,7 +18,10 @@ namespace boost { namespace buffers { -/** A DynamicBuffer with a fixed capacity +/** A DynamicBuffer with a fixed capacity. + + Buffer sequences returned by this container + always have a single element. */ class flat_buffer { diff --git a/include/boost/buffers/mutable_buffer_pair.hpp b/include/boost/buffers/mutable_buffer_pair.hpp index 1c5341f..9b7e1ff 100644 --- a/include/boost/buffers/mutable_buffer_pair.hpp +++ b/include/boost/buffers/mutable_buffer_pair.hpp @@ -19,7 +19,8 @@ namespace buffers { /** A mutable buffer pair */ -class mutable_buffer_pair +class BOOST_SYMBOL_VISIBLE + mutable_buffer_pair { public: using value_type = mutable_buffer; @@ -98,12 +99,10 @@ class mutable_buffer_pair #endif private: - BOOST_BUFFERS_DECL mutable_buffer_pair prefix_impl( std::size_t n) const noexcept; - BOOST_BUFFERS_DECL mutable_buffer_pair suffix_impl( std::size_t n) const noexcept; diff --git a/include/boost/buffers/mutable_buffer_span.hpp b/include/boost/buffers/mutable_buffer_span.hpp index 94b2d9d..e1edb3d 100644 --- a/include/boost/buffers/mutable_buffer_span.hpp +++ b/include/boost/buffers/mutable_buffer_span.hpp @@ -23,7 +23,8 @@ namespace buffers { Objects of this type meet the requirements of MutableBufferSequence. */ -class mutable_buffer_span +class BOOST_SYMBOL_VISIBLE + mutable_buffer_span { mutable_buffer const* p_ = nullptr; std::size_t n_ = 0; diff --git a/include/boost/buffers/mutable_buffer_subspan.hpp b/include/boost/buffers/mutable_buffer_subspan.hpp index 8315fbc..2495ffd 100644 --- a/include/boost/buffers/mutable_buffer_subspan.hpp +++ b/include/boost/buffers/mutable_buffer_subspan.hpp @@ -25,7 +25,8 @@ class mutable_buffer_span; Objects of this type meet the requirements of MutableBufferSequence. */ -class mutable_buffer_subspan +class BOOST_SYMBOL_VISIBLE + mutable_buffer_subspan { mutable_buffer const* p_ = nullptr; std::size_t n_ = 0; @@ -55,7 +56,6 @@ class mutable_buffer_subspan /** Constructor. */ - BOOST_BUFFERS_DECL mutable_buffer_subspan( mutable_buffer const* p, std::size_t n) noexcept; @@ -109,10 +109,10 @@ class mutable_buffer_subspan #endif private: - BOOST_BUFFERS_DECL mutable_buffer_subspan - prefix_impl(std::size_t n) const noexcept; - BOOST_BUFFERS_DECL mutable_buffer_subspan - suffix_impl(std::size_t n) const noexcept; + mutable_buffer_subspan prefix_impl( + std::size_t n) const noexcept; + mutable_buffer_subspan suffix_impl( + std::size_t n) const noexcept; }; } // buffers