Skip to content

Commit

Permalink
chore: shared exports and visibility
Browse files Browse the repository at this point in the history
  • Loading branch information
vinniefalco committed Jan 19, 2024
1 parent fea4eb7 commit c57b56d
Show file tree
Hide file tree
Showing 10 changed files with 29 additions and 27 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion include/boost/buffers/any_dynamic_buffer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
7 changes: 2 additions & 5 deletions include/boost/buffers/circular_buffer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
};
Expand Down
5 changes: 2 additions & 3 deletions include/boost/buffers/const_buffer_pair.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down
3 changes: 2 additions & 1 deletion include/boost/buffers/const_buffer_span.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ namespace buffers {
Objects of this type meet the requirements
of <em>ConstBufferSequence</em>.
*/
class const_buffer_span
class BOOST_SYMBOL_VISIBLE
const_buffer_span
{
const_buffer const* p_ = nullptr;
std::size_t n_ = 0;
Expand Down
12 changes: 6 additions & 6 deletions include/boost/buffers/const_buffer_subspan.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ class const_buffer_span;
Objects of this type meet the requirements
of <em>ConstBufferSequence</em>.
*/
class const_buffer_subspan
class BOOST_SYMBOL_VISIBLE
const_buffer_subspan
{
const_buffer const* p_ = nullptr;
std::size_t n_ = 0;
Expand Down Expand Up @@ -55,7 +56,6 @@ class const_buffer_subspan

/** Constructor.
*/
BOOST_BUFFERS_DECL
const_buffer_subspan(
const_buffer const* p,
std::size_t n) noexcept;
Expand Down Expand Up @@ -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
Expand Down
5 changes: 4 additions & 1 deletion include/boost/buffers/flat_buffer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
5 changes: 2 additions & 3 deletions include/boost/buffers/mutable_buffer_pair.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down
3 changes: 2 additions & 1 deletion include/boost/buffers/mutable_buffer_span.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ namespace buffers {
Objects of this type meet the requirements
of <em>MutableBufferSequence</em>.
*/
class mutable_buffer_span
class BOOST_SYMBOL_VISIBLE
mutable_buffer_span
{
mutable_buffer const* p_ = nullptr;
std::size_t n_ = 0;
Expand Down
12 changes: 6 additions & 6 deletions include/boost/buffers/mutable_buffer_subspan.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ class mutable_buffer_span;
Objects of this type meet the requirements
of <em>MutableBufferSequence</em>.
*/
class mutable_buffer_subspan
class BOOST_SYMBOL_VISIBLE
mutable_buffer_subspan
{
mutable_buffer const* p_ = nullptr;
std::size_t n_ = 0;
Expand Down Expand Up @@ -55,7 +56,6 @@ class mutable_buffer_subspan

/** Constructor.
*/
BOOST_BUFFERS_DECL
mutable_buffer_subspan(
mutable_buffer const* p,
std::size_t n) noexcept;
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit c57b56d

Please sign in to comment.