diff --git a/.cursorignore b/.cursorignore new file mode 100644 index 00000000..2a869fdb --- /dev/null +++ b/.cursorignore @@ -0,0 +1,25 @@ +/bin +/bin64 + +/__build__ +/toolchain.cmake + +# Emacs +*# + +# Vim +*~ + +# Visual Studio +/.vs +/out + +# Visual Studio Code +/.vscode +CMakeUserPresets.json + +# clangd +/.cache +/.clangd +/compile_commands.json +# Add directories or file patterns to ignore during indexing (e.g. foo/ or *.csv) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c690f169..0554c4a6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -864,6 +864,13 @@ jobs: with: path: buffers-root + - name: Clone Boost.Capy + uses: actions/checkout@v3 + with: + path: capy-root + repository: cppalliance/capy + ref: develop + - name: Setup C++ uses: alandefreitas/cpp-actions/setup-cpp@v1.9.0 id: setup-cpp @@ -888,8 +895,12 @@ jobs: branch: ${{ (github.ref_name == 'master' && github.ref_name) || 'develop' }} boost-dir: boost-source modules-exclude-paths: '' - scan-modules-dir: buffers-root - scan-modules-ignore: buffers + scan-modules-dir: | + buffers-root + capy-root + scan-modules-ignore: | + buffers + capy - name: Patch Boost id: patch @@ -922,6 +933,7 @@ jobs: # Patch boost-root with workspace module cp -r "$workspace_root"/buffers-root "libs/$module" + cp -r "$workspace_root"/capy-root libs/capy - name: Boost B2 Workflow uses: alandefreitas/cpp-actions/b2-workflow@v1.9.0 diff --git a/.github/workflows/claude.yml b/.github/workflows/claude.yml deleted file mode 100644 index 8f380d8f..00000000 --- a/.github/workflows/claude.yml +++ /dev/null @@ -1,60 +0,0 @@ -name: Claude Code - -on: - issue_comment: - types: [created] - pull_request_review_comment: - types: [created] - issues: - types: [opened, assigned] - pull_request_review: - types: [submitted] - -jobs: - claude: - if: | - (github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude')) || - (github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@claude')) || - (github.event_name == 'pull_request_review' && contains(github.event.review.body, '@claude')) || - (github.event_name == 'issues' && (contains(github.event.issue.body, '@claude') || contains(github.event.issue.title, '@claude'))) - runs-on: ubuntu-latest - permissions: - contents: write - pull-requests: write - issues: write - id-token: write - actions: read # Required for Claude to read CI results on PRs - steps: - - name: Checkout repository - uses: actions/checkout@v5 - with: - fetch-depth: 1 - - - name: Run Claude Code - id: claude - uses: anthropics/claude-code-action@v1 - with: - anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }} - additional_permissions: | - actions: read - - # Optional: Customize the trigger phrase (default: @claude) - # trigger_phrase: "/claude" - - # Optional: Trigger when specific user is assigned to an issue - # assignee_trigger: "claude-bot" - - # Optional: Configure Claude's behavior with CLI arguments - # claude_args: | - # --model claude-opus-4-1-20250805 - # --max-turns 10 - # --allowedTools "Bash(npm install),Bash(npm run build),Bash(npm run test:*),Bash(npm run lint:*)" - # --system-prompt "Follow our coding standards. Ensure all new code has tests. Use TypeScript for new files." - - # Optional: Advanced settings configuration - # settings: | - # { - # "env": { - # "NODE_ENV": "test" - # } - # } \ No newline at end of file diff --git a/.gitignore b/.gitignore index 9e1d7e0c..3fee83b7 100644 --- a/.gitignore +++ b/.gitignore @@ -16,6 +16,7 @@ # Visual Studio Code /.vscode +CMakeUserPresets.json # clangd /.cache diff --git a/CMakeLists.txt b/CMakeLists.txt index 3090d1d2..3ec5d38a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -55,6 +55,7 @@ set(BOOST_SRC_DIR ${DEFAULT_BOOST_SRC_DIR} CACHE STRING "Boost source dir to use # The boost super-project requires one explicit dependency per-line. set(BOOST_BUFFERS_DEPENDENCIES Boost::assert + Boost::capy Boost::config Boost::core Boost::system diff --git a/build/Jamfile b/build/Jamfile index 624707df..d17e260b 100644 --- a/build/Jamfile +++ b/build/Jamfile @@ -41,7 +41,12 @@ explicit buffers_sources ; lib boost_buffers : buffers_sources : requirements + /boost//system + /boost//capy + ../ : usage-requirements + /boost//system + /boost//capy ; boost-install boost_buffers ; diff --git a/doc/modules/ROOT/nav.adoc b/doc/modules/ROOT/nav.adoc index 6f7562ca..29e2e5f2 100644 --- a/doc/modules/ROOT/nav.adoc +++ b/doc/modules/ROOT/nav.adoc @@ -1,9 +1,11 @@ -* xref:1.intro.adoc[] -* xref:2.algorithms.adoc[] -* xref:3.dynamic-buffers.adoc[] -* xref:4.custom-sequences.adoc[] +* xref:intro.adoc[] +* xref:algorithms.adoc[] +* xref:dynamic-buffers.adoc[] +* xref:custom-sequences.adoc[] * Concepts -** xref:5.1.ConstBufferSequence.adoc[] -** xref:5.2.MutableBufferSequence.adoc[] -** xref:5.3.DynamicBuffer.adoc[] +** xref:ConstBufferSequence.adoc[] +** xref:MutableBufferSequence.adoc[] +** xref:DynamicBuffer.adoc[] +** xref:ReadSource.adoc[] +** xref:DataSource.adoc[] * xref:reference:boost/buffers.adoc[Reference] diff --git a/doc/modules/ROOT/pages/5.1.ConstBufferSequence.adoc b/doc/modules/ROOT/pages/ConstBufferSequence.adoc similarity index 99% rename from doc/modules/ROOT/pages/5.1.ConstBufferSequence.adoc rename to doc/modules/ROOT/pages/ConstBufferSequence.adoc index b741c423..0a9a3400 100644 --- a/doc/modules/ROOT/pages/5.1.ConstBufferSequence.adoc +++ b/doc/modules/ROOT/pages/ConstBufferSequence.adoc @@ -55,3 +55,4 @@ assert( std::equal( * cpp:mutable_buffer_1[] * cpp:mutable_buffer_pair[] * cpp:slice_of[] + diff --git a/doc/modules/ROOT/pages/DataSource.adoc b/doc/modules/ROOT/pages/DataSource.adoc new file mode 100644 index 00000000..2483edf2 --- /dev/null +++ b/doc/modules/ROOT/pages/DataSource.adoc @@ -0,0 +1,100 @@ +// +// Copyright (c) 2025 Vinnie Falco (vinnie dot falco at gmail dot com) +// +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +// +// Official repository: https://github.com/cppalliance/buffers +// + += DataSource + +A __DataSource__ represents a source of data that is available as a constant +buffer sequence in memory. Unlike a xref:ReadSource.adoc[_ReadSource_], +which provides data through a streaming `read` interface, a data source +exposes its entire contents directly through a `data()` member function. + +Data sources are useful for representing objects whose binary representation +is already available in memory and can be accessed without copying, such as +strings, byte arrays, or memory-mapped files. + +== Related Identifiers + +cpp:is_data_source[] + +== Requirements + +* `D` denotes a data source class. +* `c` denotes a (possibly const) value of type `D`. +* `T` denotes a type meeting the requirements for xref:ConstBufferSequence.adoc[_ConstBufferSequence_]. + +[cols="1a,1a,5a"] +|=== +// Headers +|Expression|Type|Semantics, Pre/Post-conditions + +|`D(D&&)` +| +|Data sources must be nothrow move constructible. + +|`c.data()` +|`T` +|Returns a constant buffer sequence representing the data. This function must +be `noexcept`. The returned buffer sequence remains valid for at least as long +as the data source object exists and is not modified. + +|=== + +== Example + +[source,cpp] +---- +struct my_data_source +{ + std::string data_; + + explicit my_data_source(std::string s) noexcept + : data_(std::move(s)) + { + } + + // Move constructor required + my_data_source(my_data_source&&) noexcept = default; + + const_buffer data() const noexcept + { + return const_buffer(data_.data(), data_.size()); + } +}; + +static_assert(is_data_source::value, ""); +---- + +== Comparison with ReadSource + +|=== +|Feature|DataSource|ReadSource + +|Data access +|Direct via `data()` returning buffer sequence +|Streaming via `read()` into caller-provided buffers + +|Memory +|Data must be in memory +|Data can be generated or streamed + +|Multiple reads +|Implicit (buffer sequence can be iterated multiple times) +|Requires `rewind()` if available + +|Size +|Implicit (via `buffers::size(data())`) +|Optional `size()` member + +|=== + +== See Also + +* cpp:any_source[] - a type-erased wrapper that can hold either a _DataSource_ or _ReadSource_ +* xref:ReadSource.adoc[_ReadSource_] - a streaming data source concept + diff --git a/doc/modules/ROOT/pages/5.3.DynamicBuffer.adoc b/doc/modules/ROOT/pages/DynamicBuffer.adoc similarity index 93% rename from doc/modules/ROOT/pages/5.3.DynamicBuffer.adoc rename to doc/modules/ROOT/pages/DynamicBuffer.adoc index eaad2202..73f6ea5c 100644 --- a/doc/modules/ROOT/pages/5.3.DynamicBuffer.adoc +++ b/doc/modules/ROOT/pages/DynamicBuffer.adoc @@ -28,8 +28,8 @@ cpp:is_dynamic_buffer[] * `a` denotes a value of type `D`. * `c` denotes a (possibly const) value of type `D`. * `n` denotes a value of type `std::size_t`. -* `T` denotes a type meeting the requirements for xref:./5.1.ConstBufferSequence.adoc[_ConstBufferSequence_]. -* `U` denotes a type meeting the requirements for xref:./5.2.MutableBufferSequence.adoc[_MutableBufferSequence_]. +* `T` denotes a type meeting the requirements for xref:ConstBufferSequence.adoc[_ConstBufferSequence_]. +* `U` denotes a type meeting the requirements for xref:MutableBufferSequence.adoc[_MutableBufferSequence_]. [cols="1a,1a,5a"] |=== @@ -95,3 +95,4 @@ constant or mutable buffer sequences previously obtained using `data()` or * `circular_buffer` * `flat_buffer` * `string_buffer` + diff --git a/doc/modules/ROOT/pages/5.2.MutableBufferSequence.adoc b/doc/modules/ROOT/pages/MutableBufferSequence.adoc similarity index 99% rename from doc/modules/ROOT/pages/5.2.MutableBufferSequence.adoc rename to doc/modules/ROOT/pages/MutableBufferSequence.adoc index 859d8a0b..b288b9b9 100644 --- a/doc/modules/ROOT/pages/5.2.MutableBufferSequence.adoc +++ b/doc/modules/ROOT/pages/MutableBufferSequence.adoc @@ -53,3 +53,4 @@ assert( std::equal( * cpp:mutable_buffer_1[] * cpp:mutable_buffer_pair[] * cpp:slice_of[] + diff --git a/doc/modules/ROOT/pages/ReadSource.adoc b/doc/modules/ROOT/pages/ReadSource.adoc new file mode 100644 index 00000000..d0acf635 --- /dev/null +++ b/doc/modules/ROOT/pages/ReadSource.adoc @@ -0,0 +1,110 @@ +// +// Copyright (c) 2025 Vinnie Falco (vinnie dot falco at gmail dot com) +// +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +// +// Official repository: https://github.com/cppalliance/buffers +// + += ReadSource + +A __ReadSource__ represents a source of data that can be read into caller-provided +buffers. Data is obtained by calling the `read` member function one or more times, +until it sets cpp:error::eof[] in the error code to indicate no more data is +available. + +Read sources are useful for representing streaming data sources where the complete +data may not be available in memory, such as file streams or generated data. + +== Related Identifiers + +cpp:is_read_source[], cpp:has_size[], cpp:has_rewind[] + +== Requirements + +* `S` denotes a read source class. +* `s` denotes a value of type `S`. +* `c` denotes a (possibly const) value of type `S`. +* `ec` denotes a value of type `system::error_code&`. +* `M` denotes a type meeting the requirements for xref:MutableBufferSequence.adoc[_MutableBufferSequence_]. +* `m` denotes a value of type `M const&`. + +[cols="1a,1a,5a"] +|=== +// Headers +|Expression|Type|Semantics, Pre/Post-conditions + +|`s.read(m, ec)` +|`std::size_t` +|Reads data from the source into the mutable buffer sequence `m`. Returns the +number of bytes written to the buffers. When no more data is available, +cpp:error::eof[] is set in `ec`. On success, `ec` is cleared. + +|`c.size()` (optional) +|`std::uint64_t` +|Returns the total size, in bytes, of the data that can be read from the source. +This member is optional. The metafunction cpp:has_size[] may be used to detect +its availability. + +|`s.rewind()` (optional) +| +|Resets the source to its initial state, allowing the data to be read again from +the beginning. This member is optional. The metafunction cpp:has_rewind[] may be +used to detect its availability. + +|=== + +== Example + +[source,cpp] +---- +struct my_read_source +{ + std::string data_; + std::size_t pos_ = 0; + + explicit my_read_source(std::string s) + : data_(std::move(s)) + { + } + + std::uint64_t size() const noexcept + { + return data_.size(); + } + + void rewind() + { + pos_ = 0; + } + + template + std::size_t read( + MutableBufferSequence const& buffers, + system::error_code& ec) + { + std::size_t n = buffers::copy( + buffers, + const_buffer( + data_.data() + pos_, + data_.size() - pos_)); + pos_ += n; + if(pos_ >= data_.size()) + ec = error::eof; + else + ec = {}; + return n; + } +}; + +static_assert(is_read_source::value, ""); +static_assert(has_size::value, ""); +static_assert(has_rewind::value, ""); +---- + +== See Also + +* cpp:any_source[] - a type-erased wrapper that can hold either a _ReadSource_ or _DataSource_ +* xref:DataSource.adoc[_DataSource_] - a concept for in-memory data sources + diff --git a/doc/modules/ROOT/pages/2.algorithms.adoc b/doc/modules/ROOT/pages/algorithms.adoc similarity index 99% rename from doc/modules/ROOT/pages/2.algorithms.adoc rename to doc/modules/ROOT/pages/algorithms.adoc index 8727cfb0..943b5d7d 100644 --- a/doc/modules/ROOT/pages/2.algorithms.adoc +++ b/doc/modules/ROOT/pages/algorithms.adoc @@ -86,3 +86,4 @@ copy( This function copies up to `at_most` bytes from the source buffer sequence to the destination sequence, or less depending on the size of the smaller of the two sequences. The return value indicates the actual number of bytes copied. + diff --git a/doc/modules/ROOT/pages/5.asio-buffers.adoc b/doc/modules/ROOT/pages/asio-buffers.adoc similarity index 99% rename from doc/modules/ROOT/pages/5.asio-buffers.adoc rename to doc/modules/ROOT/pages/asio-buffers.adoc index 4041f1e6..7ffe6316 100644 --- a/doc/modules/ROOT/pages/5.asio-buffers.adoc +++ b/doc/modules/ROOT/pages/asio-buffers.adoc @@ -26,3 +26,4 @@ https://github.com/cppalliance/http_proto[Boost.WS.Proto] (proposed) libraries. * + diff --git a/doc/modules/ROOT/pages/4.custom-sequences.adoc b/doc/modules/ROOT/pages/custom-sequences.adoc similarity index 99% rename from doc/modules/ROOT/pages/4.custom-sequences.adoc rename to doc/modules/ROOT/pages/custom-sequences.adoc index da392c1c..2b544a9a 100644 --- a/doc/modules/ROOT/pages/4.custom-sequences.adoc +++ b/doc/modules/ROOT/pages/custom-sequences.adoc @@ -84,3 +84,4 @@ tag_invoke( |=== \[1\] https://www.youtube.com/watch?v=POa_V15je8Y[Making New Friends (CppCon 2018)] + diff --git a/doc/modules/ROOT/pages/3.dynamic-buffers.adoc b/doc/modules/ROOT/pages/dynamic-buffers.adoc similarity index 99% rename from doc/modules/ROOT/pages/3.dynamic-buffers.adoc rename to doc/modules/ROOT/pages/dynamic-buffers.adoc index 1f6d9ffd..d713185c 100644 --- a/doc/modules/ROOT/pages/3.dynamic-buffers.adoc +++ b/doc/modules/ROOT/pages/dynamic-buffers.adoc @@ -28,3 +28,4 @@ which may be automatically sized as required. * The input sequence is returned by calling `data()` * The input sequence is released by calling `consume(n)` + diff --git a/doc/modules/ROOT/pages/1.intro.adoc b/doc/modules/ROOT/pages/intro.adoc similarity index 97% rename from doc/modules/ROOT/pages/1.intro.adoc rename to doc/modules/ROOT/pages/intro.adoc index 02c19be3..25861afc 100644 --- a/doc/modules/ROOT/pages/1.intro.adoc +++ b/doc/modules/ROOT/pages/intro.adoc @@ -80,8 +80,8 @@ There are some caveats with this approach: The approach taken by this library is the same as the approach used in the popular Boost.Asio network library. That is, to define the concepts -xref:5.1.ConstBufferSequence.adoc[_ConstBufferSequence_] and -xref:5.2.MutableBufferSequence.adoc[_MutableBufferSequence_] for +xref:ConstBufferSequence.adoc[_ConstBufferSequence_] and +xref:MutableBufferSequence.adoc[_MutableBufferSequence_] for representing buffer sequences with these semantics: * A buffer sequence is cheap to copy. @@ -111,3 +111,4 @@ frequency that the library provides a custom implementation for representing them. Objects of types cpp:const_buffer_pair[] and cpp:mutable_buffer_pair[] are buffer sequences of length two. These are the type of sequences returned by the cpp:circular_buffer[], discussed later. + diff --git a/include/boost/buffers.hpp b/include/boost/buffers.hpp index 9c6a3881..9382aeab 100644 --- a/include/boost/buffers.hpp +++ b/include/boost/buffers.hpp @@ -12,7 +12,9 @@ #include #include +#include #include +#include #include #include #include diff --git a/include/boost/buffers/any_sink.hpp b/include/boost/buffers/any_sink.hpp new file mode 100644 index 00000000..d7de0c2f --- /dev/null +++ b/include/boost/buffers/any_sink.hpp @@ -0,0 +1,21 @@ +// +// Copyright (c) 2025 Vinnie Falco (vinnie dot falco at gmail dot com) +// +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +// +// Official repository: https://github.com/cppalliance/beast2 +// + +#ifndef BOOST_BUFFERS_ANY_SINK_HPP +#define BOOST_BUFFERS_ANY_SINK_HPP + +#include + +namespace boost { +namespace buffers { + +} // buffers +} // boost + +#endif diff --git a/include/boost/buffers/any_stream.hpp b/include/boost/buffers/any_stream.hpp new file mode 100644 index 00000000..79352cdc --- /dev/null +++ b/include/boost/buffers/any_stream.hpp @@ -0,0 +1,105 @@ +// +// Copyright (c) 2025 Vinnie Falco (vinnie dot falco at gmail dot com) +// +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +// +// Official repository: https://github.com/cppalliance/capy +// + +#ifndef BOOST_BUFFERS_ANY_STREAM_HPP +#define BOOST_BUFFERS_ANY_STREAM_HPP + +#include + +#ifdef BOOST_BUFFERS_HAS_CORO + +#include +#include +#include +#include +#include + +namespace boost { +namespace buffers { + +/** Result of an asynchronous I/O operation. +*/ +struct io_result +{ + /** The error code, if any occurred. + */ + system::error_code ec; + + /** Number of bytes transferred. + */ + std::size_t bytes_transferred; +}; + +/** Asynchronous result type for I/O operations. +*/ +using async_io_result = capy::async_result; + +class any_stream +{ +public: + struct impl + { + virtual ~impl() = default; + + virtual auto read_some( + buffers::mutable_buffer) -> + async_io_result = 0; + + virtual auto write_some( + buffers::const_buffer) -> + async_io_result = 0; + }; + + /** Constructor + @param p A pointer to the stream implementation. + */ + any_stream( + std::shared_ptr p) noexcept + : impl_(std::move(p)) + { + } + + /** Read some data into the buffer. + + This coroutine reads some data into the buffer + and returns the number of bytes read. + + @param b The buffer to read into. + @return The asynchronous result. + */ + auto read_some( + buffers::mutable_buffer b) -> + async_io_result + { + return impl_->read_some(b); + } + + /** Write some data from the buffer. + This coroutine writes some data from the buffer + and returns the number of bytes written. + @param b The buffer to write from. + @return The asynchronous result. + */ + auto write_some( + buffers::const_buffer b) -> + async_io_result + { + return impl_->write_some(b); + } + +private: + std::shared_ptr impl_; +}; + +} // buffers +} // boost + +#endif + +#endif diff --git a/include/boost/buffers/detail/config.hpp b/include/boost/buffers/detail/config.hpp index f209062e..176884b3 100644 --- a/include/boost/buffers/detail/config.hpp +++ b/include/boost/buffers/detail/config.hpp @@ -12,6 +12,10 @@ #include +#if __has_include() +# include +#endif + namespace boost { namespace buffers { @@ -58,7 +62,15 @@ namespace buffers { return ::boost::system::error_code((ev), &loc ## __LINE__) #endif -//------------------------------------------------ +//----------------------------------------------- + +#if defined(__cpp_lib_coroutine) && __cpp_lib_coroutine >= 201902L +# define BOOST_BUFFERS_HAS_CORO 1 +#elif defined(__cpp_impl_coroutine) && __cpp_impl_coroutines >= 201902L +# define BOOST_BUFFERS_HAS_CORO 1 +#endif + +//----------------------------------------------- // avoid all of Boost.TypeTraits for just this namespace detail { diff --git a/include/boost/buffers/sink.hpp b/include/boost/buffers/sink.hpp new file mode 100644 index 00000000..513a8839 --- /dev/null +++ b/include/boost/buffers/sink.hpp @@ -0,0 +1,97 @@ +// +// Copyright (c) 2025 Vinnie Falco (vinnie dot falco at gmail dot com) +// +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +// +// Official repository: https://github.com/cppalliance/buffers +// + +#ifndef BOOST_BUFFERS_SINK_HPP +#define BOOST_BUFFERS_SINK_HPP + +#include +#include +#include +#include +#include + +namespace boost { +namespace buffers { + +/* +struct buffer_sink +{ + void size_hint( std::size_t size ); + + struct mutable_buffer_sequence; + + auto prepare( std::size_t size ) + -> mutable_buffer_sequence; + + auto commit( + std::size_t n, + bool finished = false ) -> + system::error_code; + + auto finish() -> system::error_code; +}; +*/ + +/** Determine if T is a WriteSink + + A type T is a Write Sink if it meets the following + requirements: + + @code + struct T + { + // Provide a hint about the amount of data to be written. + void size_hint( std::size_t size ); + // Write data from the ConstBufferSequence. + system::error_code write( + ConstBufferSequence const& data, + bool finished = false ); + // Indicate that no more data will be written. + system::error_code finish(); + }; + @endcode + @see buffers_sink +*/ +template +struct is_write_sink : std::false_type {}; + +template +struct is_write_sink().size_hint(std::declval())), + typename std::enable_if< + std::is_same< + decltype(std::declval().write( + std::declval(), + std::declval())), + system::error_code>::value>::type, + typename std::enable_if< + std::is_same< + decltype(std::declval().finish()), + system::error_code>::value>::type +>> : std::true_type {}; + +//----------------------------------------------- + +class any_write_sink +{ +public: + +private: +}; + + +struct body +{ + +}; + +} // buffers +} // boost + +#endif diff --git a/test/cmake_test/CMakeLists.txt b/test/cmake_test/CMakeLists.txt index 505b7abb..547c6859 100644 --- a/test/cmake_test/CMakeLists.txt +++ b/test/cmake_test/CMakeLists.txt @@ -22,6 +22,7 @@ else() # Primary dependencies assert + capy config core system diff --git a/test/unit/any_stream.cpp b/test/unit/any_stream.cpp new file mode 100644 index 00000000..f3b56f58 --- /dev/null +++ b/test/unit/any_stream.cpp @@ -0,0 +1,34 @@ +// +// Copyright (c) 2025 Vinnie Falco (vinnie dot falco at gmail dot com) +// +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +// +// Official repository: https://github.com/cppalliance/beast2 +// + +// Test that header file is self-contained. +#include + +#ifdef BOOST_BUFFERS_HAS_CORO + +#include "test_suite.hpp" + +namespace boost { +namespace buffers { + +struct any_stream_test +{ + void run() + { + } +}; + +TEST_SUITE( + any_stream_test, + "boost.buffers.any_stream"); + +} // buffers +} // boost + +#endif