From 338d50e47d2bb1578f5ade9791f29cb95296d921 Mon Sep 17 00:00:00 2001 From: Sergio DuBois Date: Thu, 4 Dec 2025 13:35:26 -0500 Subject: [PATCH 01/23] Export route_params vtable for shared builds --- include/boost/http_proto/server/route_handler.hpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/include/boost/http_proto/server/route_handler.hpp b/include/boost/http_proto/server/route_handler.hpp index 399310d5..9b81fe36 100644 --- a/include/boost/http_proto/server/route_handler.hpp +++ b/include/boost/http_proto/server/route_handler.hpp @@ -34,7 +34,7 @@ struct acceptor_config /** Parameters object for HTTP route handlers */ -struct BOOST_SYMBOL_VISIBLE +struct BOOST_HTTP_PROTO_DECL route_params : route_params_base { /** The complete request target @@ -82,7 +82,6 @@ struct BOOST_SYMBOL_VISIBLE /** Destructor */ - BOOST_HTTP_PROTO_DECL ~route_params(); /** Reset the object for a new request. @@ -90,7 +89,6 @@ struct BOOST_SYMBOL_VISIBLE the previous request, preparing the object for use with a new request. */ - BOOST_HTTP_PROTO_DECL void reset(); /** Set the status code of the response. @@ -101,11 +99,9 @@ struct BOOST_SYMBOL_VISIBLE @param code The status code to set. @return A reference to this response. */ - BOOST_HTTP_PROTO_DECL route_params& status(http_proto::status code); - BOOST_HTTP_PROTO_DECL route_params& set_body(std::string s); @@ -163,7 +159,6 @@ struct BOOST_SYMBOL_VISIBLE Subclasses must schedule task_ to be invoked at an unspecified point in the future. */ - BOOST_HTTP_PROTO_DECL virtual void do_post(); std::unique_ptr task_; From ce7c5e25434c720f794b256132596208c5e40670 Mon Sep 17 00:00:00 2001 From: Sergio DuBois Date: Thu, 4 Dec 2025 13:39:22 -0500 Subject: [PATCH 02/23] Note MinGW export requirement --- CLAUDE.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CLAUDE.md b/CLAUDE.md index 912365a4..4f736ad6 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -60,3 +60,7 @@ T default_value(); - Concise, dry answers - Full files, not diffs - Accurate, compiling C++ code + +## Windows/MinGW note + +- For polymorphic types in shared builds on Windows (MinGW/MSVC), export the class itself (use `BOOST_HTTP_PROTO_DECL` or the module’s `_DECL` macro) so the vtable is emitted/imported. Member-level exports alone are insufficient and lead to undefined vtable link errors. From 27574ba1e317fb7f5c92eaff7113a482bc87edf7 Mon Sep 17 00:00:00 2001 From: Sergio DuBois Date: Thu, 4 Dec 2025 13:51:37 -0500 Subject: [PATCH 03/23] Clarify Windows export guidance --- CLAUDE.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CLAUDE.md b/CLAUDE.md index 4f736ad6..358fe086 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -63,4 +63,4 @@ T default_value(); ## Windows/MinGW note -- For polymorphic types in shared builds on Windows (MinGW/MSVC), export the class itself (use `BOOST_HTTP_PROTO_DECL` or the module’s `_DECL` macro) so the vtable is emitted/imported. Member-level exports alone are insufficient and lead to undefined vtable link errors. +- On Windows (MinGW/MSVC) shared builds, apply the module's `*_DECL` macro to polymorphic class declarations, not just members, to export the vtable. From 2cac4207bae0ad5dfcc584f1d935069cef2ec48f Mon Sep 17 00:00:00 2001 From: Sergio DuBois Date: Thu, 4 Dec 2025 21:23:14 -0500 Subject: [PATCH 04/23] Export public classes for MSVC dll-interface --- include/boost/http_proto/request.hpp | 2 +- include/boost/http_proto/request_parser.hpp | 2 +- include/boost/http_proto/response.hpp | 2 +- include/boost/http_proto/serializer.hpp | 2 +- include/boost/http_proto/server/route_handler.hpp | 2 +- include/boost/http_proto/server/router_types.hpp | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/include/boost/http_proto/request.hpp b/include/boost/http_proto/request.hpp index 075d9bcb..d83eefbb 100644 --- a/include/boost/http_proto/request.hpp +++ b/include/boost/http_proto/request.hpp @@ -45,7 +45,7 @@ namespace http_proto { @ref static_request, @ref request_base. */ -class request +class BOOST_HTTP_PROTO_DECL request : public request_base { public: diff --git a/include/boost/http_proto/request_parser.hpp b/include/boost/http_proto/request_parser.hpp index 9c4ef457..5ec54074 100644 --- a/include/boost/http_proto/request_parser.hpp +++ b/include/boost/http_proto/request_parser.hpp @@ -23,7 +23,7 @@ namespace http_proto { /// @copydoc parser /// @brief A parser for HTTP/1 requests. /// @see @ref response_parser. -class request_parser +class BOOST_HTTP_PROTO_DECL request_parser : public parser { public: diff --git a/include/boost/http_proto/response.hpp b/include/boost/http_proto/response.hpp index e4086ec2..8e6f34fd 100644 --- a/include/boost/http_proto/response.hpp +++ b/include/boost/http_proto/response.hpp @@ -47,7 +47,7 @@ namespace http_proto { @ref static_response, @ref response_base. */ -class response +class BOOST_HTTP_PROTO_DECL response : public response_base { public: diff --git a/include/boost/http_proto/serializer.hpp b/include/boost/http_proto/serializer.hpp index e0e65d08..4db62ad9 100644 --- a/include/boost/http_proto/serializer.hpp +++ b/include/boost/http_proto/serializer.hpp @@ -53,7 +53,7 @@ class message_base; called, or the serializer is destroyed, otherwise the behavior is undefined. */ -class serializer +class BOOST_HTTP_PROTO_DECL serializer { public: class stream; diff --git a/include/boost/http_proto/server/route_handler.hpp b/include/boost/http_proto/server/route_handler.hpp index 9b81fe36..1d162c57 100644 --- a/include/boost/http_proto/server/route_handler.hpp +++ b/include/boost/http_proto/server/route_handler.hpp @@ -143,7 +143,7 @@ struct BOOST_HTTP_PROTO_DECL protected: /** A task to be invoked later */ - struct task + struct BOOST_HTTP_PROTO_DECL task { virtual ~task() = default; diff --git a/include/boost/http_proto/server/router_types.hpp b/include/boost/http_proto/server/router_types.hpp index 39f2306f..e98fd8fa 100644 --- a/include/boost/http_proto/server/router_types.hpp +++ b/include/boost/http_proto/server/router_types.hpp @@ -157,7 +157,7 @@ class resumer; This holds an reference to an implementation which detaches the handler from its session. */ -class detacher +class BOOST_HTTP_PROTO_DECL detacher { public: /** Base class of the implementation From 863d0e37c313fcff65c47d5bf51de77a892af9da Mon Sep 17 00:00:00 2001 From: Sergio DuBois Date: Thu, 4 Dec 2025 21:35:39 -0500 Subject: [PATCH 05/23] Remove member exports after class-level export --- include/boost/http_proto/serializer.hpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/include/boost/http_proto/serializer.hpp b/include/boost/http_proto/serializer.hpp index 4db62ad9..9142e34c 100644 --- a/include/boost/http_proto/serializer.hpp +++ b/include/boost/http_proto/serializer.hpp @@ -68,8 +68,7 @@ class BOOST_HTTP_PROTO_DECL serializer /** Destructor */ - BOOST_HTTP_PROTO_DECL - ~serializer(); + ~serializer(); /** Constructor Default-constructed serializers do not reference any implementation; @@ -100,8 +99,7 @@ class BOOST_HTTP_PROTO_DECL serializer @param other The serializer to move from. */ - BOOST_HTTP_PROTO_DECL - serializer( + serializer( serializer&& other) noexcept; /** Assignment. @@ -805,8 +803,7 @@ class serializer::stream @ref commit, @ref capacity. */ - BOOST_HTTP_PROTO_DECL - mutable_buffers_type + mutable_buffers_type prepare(); /** Commit data to the serializer. From 7d4e551d26ab4993f41b08c0e5d6c673d91d64ad Mon Sep 17 00:00:00 2001 From: Sergio DuBois Date: Thu, 4 Dec 2025 21:45:16 -0500 Subject: [PATCH 06/23] Drop member exports now that classes are exported --- include/boost/http_proto/request_parser.hpp | 2 -- include/boost/http_proto/serializer.hpp | 1 - 2 files changed, 3 deletions(-) diff --git a/include/boost/http_proto/request_parser.hpp b/include/boost/http_proto/request_parser.hpp index 5ec54074..3bbf64d7 100644 --- a/include/boost/http_proto/request_parser.hpp +++ b/include/boost/http_proto/request_parser.hpp @@ -138,7 +138,6 @@ class BOOST_HTTP_PROTO_DECL request_parser @ref install_parser_service, @ref config. */ - BOOST_HTTP_PROTO_DECL explicit request_parser(capy::polystore& ctx); @@ -160,7 +159,6 @@ class BOOST_HTTP_PROTO_DECL request_parser @see @ref got_header. */ - BOOST_HTTP_PROTO_DECL static_request const& get() const; }; diff --git a/include/boost/http_proto/serializer.hpp b/include/boost/http_proto/serializer.hpp index 9142e34c..307ea3ca 100644 --- a/include/boost/http_proto/serializer.hpp +++ b/include/boost/http_proto/serializer.hpp @@ -528,7 +528,6 @@ class BOOST_HTTP_PROTO_DECL serializer /** Return true if serialization is complete. */ - BOOST_HTTP_PROTO_DECL bool is_done() const noexcept; From f40a6a9c5e7426aa54ad9985c1c5d16a92d0af57 Mon Sep 17 00:00:00 2001 From: Sergio DuBois Date: Fri, 5 Dec 2025 09:16:59 -0500 Subject: [PATCH 07/23] Export base classes and clean member annotations --- include/boost/http_proto/parser.hpp | 48 +++++++++++----------- include/boost/http_proto/request_base.hpp | 2 +- include/boost/http_proto/response_base.hpp | 2 +- include/boost/http_proto/serializer.hpp | 30 +++++++------- 4 files changed, 41 insertions(+), 41 deletions(-) diff --git a/include/boost/http_proto/parser.hpp b/include/boost/http_proto/parser.hpp index 6af8c8dd..d53a2d5c 100644 --- a/include/boost/http_proto/parser.hpp +++ b/include/boost/http_proto/parser.hpp @@ -112,14 +112,14 @@ class parser @ref body, @ref start. */ - BOOST_HTTP_PROTO_DECL + bool is_complete() const noexcept; #if 0 /** Return true if any input was committed. */ - BOOST_HTTP_PROTO_DECL + bool got_some() const noexcept; @@ -153,7 +153,7 @@ class parser This function must be called before parsing the first message in a new stream. */ - BOOST_HTTP_PROTO_DECL + void reset() noexcept; @@ -167,7 +167,7 @@ class parser first message being read from the stream or if the previous message has been fully parsed. */ - BOOST_HTTP_PROTO_DECL + void start(); @@ -195,7 +195,7 @@ class parser @ref commit, @ref commit_eof. */ - BOOST_HTTP_PROTO_DECL + mutable_buffers_type prepare(); @@ -223,7 +223,7 @@ class parser @ref parse, @ref prepare. */ - BOOST_HTTP_PROTO_DECL + void commit( std::size_t n); @@ -241,7 +241,7 @@ class parser @ref parse, @ref prepare. */ - BOOST_HTTP_PROTO_DECL + void commit_eof(); @@ -282,7 +282,7 @@ class parser @ref commit, @ref commit_eof. */ - BOOST_HTTP_PROTO_DECL + void parse( system::error_code& ec); @@ -493,7 +493,7 @@ class parser @see @ref config_base::body_limit. */ - BOOST_HTTP_PROTO_DECL + void set_body_limit(std::uint64_t n); @@ -531,7 +531,7 @@ class parser @see @ref consume_body. */ - BOOST_HTTP_PROTO_DECL + const_buffers_type pull_body(); @@ -551,7 +551,7 @@ class parser @see @ref pull_body. */ - BOOST_HTTP_PROTO_DECL + void consume_body(std::size_t n); @@ -587,7 +587,7 @@ class parser @see @ref is_complete. */ - BOOST_HTTP_PROTO_DECL + core::string_view body() const; @@ -605,7 +605,7 @@ class parser @ref metadata::upgrade, @ref metadata::connection. */ // VFALCO rename to get_leftovers()? - BOOST_HTTP_PROTO_DECL + core::string_view release_buffered_data() noexcept; @@ -614,13 +614,13 @@ class parser friend class response_parser; class impl; - BOOST_HTTP_PROTO_DECL ~parser(); - BOOST_HTTP_PROTO_DECL parser() noexcept; - BOOST_HTTP_PROTO_DECL parser(parser&& other) noexcept; - BOOST_HTTP_PROTO_DECL parser(capy::polystore&, detail::kind); - BOOST_HTTP_PROTO_DECL void assign(parser&& other) noexcept; + ~parser(); + parser() noexcept; + parser(parser&& other) noexcept; + parser(capy::polystore&, detail::kind); + void assign(parser&& other) noexcept; - BOOST_HTTP_PROTO_DECL + void start_impl(bool); @@ -630,19 +630,19 @@ class parser static_response const& safe_get_response() const; - BOOST_HTTP_PROTO_DECL + detail::workspace& ws() noexcept; - BOOST_HTTP_PROTO_DECL + bool is_body_set() const noexcept; - BOOST_HTTP_PROTO_DECL + void set_body_impl(buffers::any_dynamic_buffer&) noexcept; - BOOST_HTTP_PROTO_DECL + void set_body_impl(sink&) noexcept; @@ -766,7 +766,7 @@ struct parser::config_base @ref request_parser::config, @ref request_parser. */ -BOOST_HTTP_PROTO_DECL + void install_parser_service( capy::polystore& ctx, diff --git a/include/boost/http_proto/request_base.hpp b/include/boost/http_proto/request_base.hpp index 450158d3..c431339e 100644 --- a/include/boost/http_proto/request_base.hpp +++ b/include/boost/http_proto/request_base.hpp @@ -290,7 +290,7 @@ class request_base set_expect_100_continue(bool b); private: - BOOST_HTTP_PROTO_DECL + void set_start_line_impl( http_proto::method m, diff --git a/include/boost/http_proto/response_base.hpp b/include/boost/http_proto/response_base.hpp index aea2ddb9..ede6525f 100644 --- a/include/boost/http_proto/response_base.hpp +++ b/include/boost/http_proto/response_base.hpp @@ -221,7 +221,7 @@ class response_base } private: - BOOST_HTTP_PROTO_DECL + void set_start_line_impl( http_proto::status sc, diff --git a/include/boost/http_proto/serializer.hpp b/include/boost/http_proto/serializer.hpp index 307ea3ca..3d8beecd 100644 --- a/include/boost/http_proto/serializer.hpp +++ b/include/boost/http_proto/serializer.hpp @@ -117,7 +117,7 @@ class BOOST_HTTP_PROTO_DECL serializer @param other The serializer to move from. @return A reference to this object. */ - BOOST_HTTP_PROTO_DECL + serializer& operator=(serializer&& other) noexcept; @@ -166,7 +166,7 @@ class BOOST_HTTP_PROTO_DECL serializer @ref install_serializer_service, @ref config. */ - BOOST_HTTP_PROTO_DECL + explicit serializer( capy::polystore& ctx); @@ -177,7 +177,7 @@ class BOOST_HTTP_PROTO_DECL serializer prepares the serializer to start serialization of a new message. */ - BOOST_HTTP_PROTO_DECL + void reset() noexcept; @@ -215,7 +215,7 @@ class BOOST_HTTP_PROTO_DECL serializer @ref message_base. */ void - BOOST_HTTP_PROTO_DECL + start(message_base const& m); /** Start serializing a message with a buffer sequence body @@ -422,7 +422,7 @@ class BOOST_HTTP_PROTO_DECL serializer @ref stream, @ref message_base. */ - BOOST_HTTP_PROTO_DECL + stream start_stream( message_base const& m); @@ -482,7 +482,7 @@ class BOOST_HTTP_PROTO_DECL serializer @ref is_done, @ref const_buffers_type. */ - BOOST_HTTP_PROTO_DECL + auto prepare() -> system::result< @@ -522,7 +522,7 @@ class BOOST_HTTP_PROTO_DECL serializer @ref is_done, @ref const_buffers_type. */ - BOOST_HTTP_PROTO_DECL + void consume(std::size_t n); @@ -537,22 +537,22 @@ class BOOST_HTTP_PROTO_DECL serializer template class cbs_gen_impl; - BOOST_HTTP_PROTO_DECL + detail::workspace& ws(); - BOOST_HTTP_PROTO_DECL + void start_init( message_base const&); - BOOST_HTTP_PROTO_DECL + void start_buffers( message_base const&, cbs_gen&); - BOOST_HTTP_PROTO_DECL + void start_source( message_base const&, @@ -662,7 +662,7 @@ struct serializer::config @ref serializer::config, @ref serializer. */ -BOOST_HTTP_PROTO_DECL + void install_serializer_service( capy::polystore& ctx, @@ -771,7 +771,7 @@ class serializer::stream @throw std::logic_error `this->is_open() == false`. */ - BOOST_HTTP_PROTO_DECL + std::size_t capacity() const; @@ -833,7 +833,7 @@ class serializer::stream @ref prepare, @ref capacity. */ - BOOST_HTTP_PROTO_DECL + void commit(std::size_t n); @@ -851,7 +851,7 @@ class serializer::stream this->is_open() == false @endcode */ - BOOST_HTTP_PROTO_DECL + void close() noexcept; From 236b8cc494e0fadc8c03a88a73c66e6a7cec8035 Mon Sep 17 00:00:00 2001 From: Sergio DuBois Date: Fri, 5 Dec 2025 10:18:32 -0500 Subject: [PATCH 08/23] Add Windows quick CI for fix/route-params-export --- .github/workflows/ci.yml | 2 + .github/workflows/windows-quick.yml | 194 ++++++++++++++++++++++++++++ 2 files changed, 196 insertions(+) create mode 100644 .github/workflows/windows-quick.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a73ea944..91b370b2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -39,6 +39,7 @@ env: jobs: runner-selection: + if: ${{ !((github.event_name == 'push' && github.ref == 'refs/heads/fix/route-params-export') || (github.event_name == 'pull_request' && github.head_ref == 'fix/route-params-export')) }} name: Runner Selection runs-on: ${{ github.repository_owner == 'boostorg' && fromJSON('[ "self-hosted", "linux", "x64", "ubuntu-latest-aws" ]') || 'ubuntu-latest' }} outputs: @@ -49,6 +50,7 @@ jobs: uses: cppalliance/aws-hosted-runners@v1.0.0 build: + if: ${{ !((github.event_name == 'push' && github.ref == 'refs/heads/fix/route-params-export') || (github.event_name == 'pull_request' && github.head_ref == 'fix/route-params-export')) }} needs: [ runner-selection ] defaults: run: diff --git a/.github/workflows/windows-quick.yml b/.github/workflows/windows-quick.yml new file mode 100644 index 00000000..878cef65 --- /dev/null +++ b/.github/workflows/windows-quick.yml @@ -0,0 +1,194 @@ +name: Windows Quick CI + +on: + push: + branches: + - fix/route-params-export + pull_request: + types: [opened, synchronize, reopened, ready_for_review] + workflow_dispatch: + +concurrency: + group: ${{ format('windows-quick:{0}', github.ref) }} + cancel-in-progress: true + +env: + GIT_FETCH_JOBS: 8 + NET_RETRY_COUNT: 5 + DEFAULT_BUILD_VARIANT: debug,release + TZ: "Europe/London" + +jobs: + windows: + if: ${{ github.event_name != 'pull_request' || github.head_ref == 'fix/route-params-export' }} + name: ${{ matrix.name }} + runs-on: windows-2022 + timeout-minutes: 60 + strategy: + fail-fast: false + matrix: + include: + - name: "MSVC 14.34 (shared, x64)" + compiler: "msvc" + version: "14.34" + cxxstd: "17,20" + latest-cxxstd: "20" + b2-toolset: "msvc-14.3" + generator: "Visual Studio 17 2022" + shared: true + build-type: "Release" + + - name: "MSVC 14.34 (shared, x86)" + compiler: "msvc" + version: "14.34" + cxxstd: "17,20" + latest-cxxstd: "20" + b2-toolset: "msvc-14.3" + generator: "Visual Studio 17 2022" + shared: true + build-type: "Release" + x86: true + + - name: "MinGW (shared)" + compiler: "mingw" + version: "*" + cxx: "g++" + cc: "gcc" + b2-toolset: "gcc" + generator: "MinGW Makefiles" + shared: true + build-type: "Debug" + + steps: + - name: Clone Boost.HTTP.Proto + uses: actions/checkout@v3 + with: + path: http-proto-root + + - name: Clone Boost.Buffers + uses: actions/checkout@v3 + with: + path: buffers-root + repository: cppalliance/buffers + ref: develop + + - 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 + with: + compiler: ${{ matrix.compiler }} + version: ${{ matrix.version }} + trace-commands: true + + - name: Install Packages (Windows) + uses: alandefreitas/cpp-actions/package-install@v1.9.0 + id: package-install-windows + with: + vcpkg: zlib brotli + vcpkg-dir: vcpkg-root + vcpkg-triplet: ${{ matrix.x86 && 'x86-windows-static' || 'x64-windows' }} + + - name: Clone Boost + uses: alandefreitas/cpp-actions/boost-clone@v1.9.0 + id: boost-clone + with: + branch: ${{ (github.ref_name == 'master' && github.ref_name) || 'develop' }} + boost-dir: boost-source + modules-exclude-paths: '' + scan-modules-dir: | + http-proto-root + buffers-root + capy-root + scan-modules-ignore: | + http_proto + buffers + capy + + - name: Patch user-config.jam (Windows) + id: patch-user-config + shell: bash + run: | + set -xe + home=$(pwd) + + triplet=${{ matrix.x86 && 'x86-windows-static' || 'x64-windows' }} + addrmdl=${{ matrix.x86 && '32' || '64' }} + + echo "import-search ${home}/boost-root/libs/capy/build ;" | sed 's/\/d\//D:\//g' >> user-config.jam + echo "using zlib : : \"${home}/vcpkg-root/installed/${triplet}/include\" \"${home}/vcpkg-root/installed/${triplet}/lib\" \"${home}/vcpkg-root/installed/${triplet}/bin\" zlib : ${addrmdl} ;" | sed 's/\/d\//D:\//g' >> user-config.jam + echo "using brotli : : \"${home}/vcpkg-root/installed/${triplet}/include\" \"${home}/vcpkg-root/installed/${triplet}/lib\" \"${home}/vcpkg-root/installed/${triplet}/bin\" : ${addrmdl} ;" | sed 's/\/d\//D:\//g' >> user-config.jam + + cat user-config.jam + + toolchain=$(echo "$GITHUB_WORKSPACE/vcpkg-root/scripts/buildsystems/vcpkg.cmake" | sed 's/\/d\//D:\//g' ) + echo "toolchain=${toolchain}" >> $GITHUB_OUTPUT + + - name: Patch Boost + id: patch + shell: bash + run: | + set -xe + module=${GITHUB_REPOSITORY#*/} + echo "module=$module" >> $GITHUB_OUTPUT + + workspace_root=$(echo "$GITHUB_WORKSPACE" | sed 's/\\/\//g') + echo -E "workspace_root=$workspace_root" >> $GITHUB_OUTPUT + + rm -r "boost-source/libs/$module" || true + + cp -r boost-source boost-root + + cd boost-root + boost_root="$(pwd)" + boost_root=$(echo "$boost_root" | sed 's/\\/\//g') + echo -E "boost_root=$boost_root" >> $GITHUB_OUTPUT + + cp -r "$workspace_root"/http-proto-root "libs/$module" + cp -r "$workspace_root"/buffers-root libs/buffers + cp -r "$workspace_root"/capy-root libs/capy + + - name: Boost B2 Workflow + uses: alandefreitas/cpp-actions/b2-workflow@v1.9.0 + env: + ASAN_OPTIONS: detect_invalid_pointer_pairs=2:strict_string_checks=1:detect_stack_use_after_return=1:check_initialization_order=1:strict_init_order=1 + with: + source-dir: boost-root + modules: http_proto + toolset: ${{ matrix.b2-toolset }} + build-variant: ${{ matrix.build-type }} + cxx: ${{ steps.setup-cpp.outputs.cxx || matrix.cxx || '' }} + cxxstd: ${{ matrix.cxxstd }} + address-model: ${{ (matrix.x86 && '32') || '64' }} + shared: ${{ matrix.shared }} + rtti: on,off + user-config: ${{ format('{0}/user-config.jam', steps.patch.outputs.workspace_root) }} + stop-on-error: true + + - name: Root Project CMake Workflow + uses: alandefreitas/cpp-actions/cmake-workflow@v1.9.0 + if: ${{ matrix.compiler == 'msvc' }} + with: + source-dir: boost-root/libs/${{ steps.patch.outputs.module }} + build-dir: __build_root_test__ + build-target: tests + run-tests: true + generator: ${{ matrix.generator }} + build-type: ${{ matrix.build-type }} + install: false + cxxstd: ${{ matrix.latest-cxxstd }} + cc: ${{ steps.setup-cpp.outputs.cc || matrix.cc }} + cxx: ${{ steps.setup-cpp.outputs.cxx || matrix.cxx }} + shared: ${{ matrix.shared }} + cmake-version: '>=3.20' + extra-args: | + -D Boost_VERBOSE=ON + -D BOOST_INCLUDE_LIBRARIES="${{ steps.patch.outputs.module }}" + export-compile-commands: false + toolchain: ${{ steps.patch-user-config.outputs.toolchain }} From 2b000aafc249e860a8c5ae46527a7f4e9c590b8b Mon Sep 17 00:00:00 2001 From: Sergio DuBois Date: Fri, 5 Dec 2025 10:33:47 -0500 Subject: [PATCH 09/23] Export parser bases and serializer stream for Windows --- include/boost/http_proto/parser.hpp | 3 ++- include/boost/http_proto/request_base.hpp | 2 +- include/boost/http_proto/response_base.hpp | 2 +- include/boost/http_proto/serializer.hpp | 3 ++- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/include/boost/http_proto/parser.hpp b/include/boost/http_proto/parser.hpp index d53a2d5c..1b1c38f9 100644 --- a/include/boost/http_proto/parser.hpp +++ b/include/boost/http_proto/parser.hpp @@ -70,7 +70,7 @@ class static_response; @ref response_parser, @ref request_parser. */ -class parser +class BOOST_HTTP_PROTO_DECL parser { public: struct config_base; @@ -767,6 +767,7 @@ struct parser::config_base @ref request_parser. */ +BOOST_HTTP_PROTO_DECL void install_parser_service( capy::polystore& ctx, diff --git a/include/boost/http_proto/request_base.hpp b/include/boost/http_proto/request_base.hpp index c431339e..560fd7cc 100644 --- a/include/boost/http_proto/request_base.hpp +++ b/include/boost/http_proto/request_base.hpp @@ -24,7 +24,7 @@ namespace http_proto { @ref request, @ref static_request. */ -class request_base +class BOOST_HTTP_PROTO_DECL request_base : public message_base { friend class request; diff --git a/include/boost/http_proto/response_base.hpp b/include/boost/http_proto/response_base.hpp index ede6525f..40af66ed 100644 --- a/include/boost/http_proto/response_base.hpp +++ b/include/boost/http_proto/response_base.hpp @@ -26,7 +26,7 @@ namespace http_proto { @ref response, @ref static_response. */ -class response_base +class BOOST_HTTP_PROTO_DECL response_base : public message_base { friend class response; diff --git a/include/boost/http_proto/serializer.hpp b/include/boost/http_proto/serializer.hpp index 3d8beecd..3ae6d12a 100644 --- a/include/boost/http_proto/serializer.hpp +++ b/include/boost/http_proto/serializer.hpp @@ -663,6 +663,7 @@ struct serializer::config @ref serializer. */ +BOOST_HTTP_PROTO_DECL void install_serializer_service( capy::polystore& ctx, @@ -691,7 +692,7 @@ install_serializer_service( @see @ref serializer::start_stream */ -class serializer::stream +class BOOST_HTTP_PROTO_DECL serializer::stream { public: /** The type used to represent a sequence From 7705369b85ea86e61b4a2e1ce5447f750a7587b0 Mon Sep 17 00:00:00 2001 From: Sergio DuBois Date: Fri, 5 Dec 2025 10:46:40 -0500 Subject: [PATCH 10/23] Fix dll-interface annotations on parser/request/response bases --- include/boost/http_proto/parser.hpp | 2 +- include/boost/http_proto/request_base.hpp | 1 - include/boost/http_proto/response_base.hpp | 1 - 3 files changed, 1 insertion(+), 3 deletions(-) diff --git a/include/boost/http_proto/parser.hpp b/include/boost/http_proto/parser.hpp index 1b1c38f9..d8dfb49b 100644 --- a/include/boost/http_proto/parser.hpp +++ b/include/boost/http_proto/parser.hpp @@ -98,7 +98,7 @@ class BOOST_HTTP_PROTO_DECL parser @ref response_parser::get, @ref request_parser::get. */ - BOOST_HTTP_PROTO_DECL + bool got_header() const noexcept; diff --git a/include/boost/http_proto/request_base.hpp b/include/boost/http_proto/request_base.hpp index 560fd7cc..24dbbc96 100644 --- a/include/boost/http_proto/request_base.hpp +++ b/include/boost/http_proto/request_base.hpp @@ -285,7 +285,6 @@ class BOOST_HTTP_PROTO_DECL request_base @param b If `true` sets `Expect: 100-continue` header otherwise erase it. */ - BOOST_HTTP_PROTO_DECL void set_expect_100_continue(bool b); diff --git a/include/boost/http_proto/response_base.hpp b/include/boost/http_proto/response_base.hpp index 40af66ed..76f35bc6 100644 --- a/include/boost/http_proto/response_base.hpp +++ b/include/boost/http_proto/response_base.hpp @@ -141,7 +141,6 @@ class BOOST_HTTP_PROTO_DECL response_base @param v The version to set. */ - BOOST_HTTP_PROTO_DECL void set_version( http_proto::version v); From 7bd47a430d74c48d22d1ae600589b3a1c0b7e4e4 Mon Sep 17 00:00:00 2001 From: Sergio DuBois Date: Fri, 5 Dec 2025 10:56:55 -0500 Subject: [PATCH 11/23] Export message_base for Windows dll-interface --- include/boost/http_proto/message_base.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/boost/http_proto/message_base.hpp b/include/boost/http_proto/message_base.hpp index 24e3a995..6169ca7e 100644 --- a/include/boost/http_proto/message_base.hpp +++ b/include/boost/http_proto/message_base.hpp @@ -32,7 +32,7 @@ namespace http_proto { @ref static_request, @ref metadata. */ -class message_base +class BOOST_HTTP_PROTO_DECL message_base : public fields_base { friend class request_base; From b6fbc1f858761b708128e332cd788883f1bcd4f3 Mon Sep 17 00:00:00 2001 From: Sergio DuBois Date: Fri, 5 Dec 2025 11:10:06 -0500 Subject: [PATCH 12/23] Remove member exports from message_base --- include/boost/http_proto/message_base.hpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/boost/http_proto/message_base.hpp b/include/boost/http_proto/message_base.hpp index 6169ca7e..7c44b410 100644 --- a/include/boost/http_proto/message_base.hpp +++ b/include/boost/http_proto/message_base.hpp @@ -126,7 +126,7 @@ class BOOST_HTTP_PROTO_DECL message_base @param n The payload size to set. */ - BOOST_HTTP_PROTO_DECL + void set_payload_size( std::uint64_t n); @@ -143,7 +143,7 @@ class BOOST_HTTP_PROTO_DECL message_base @param n The Content-Length to set. */ - BOOST_HTTP_PROTO_DECL + void set_content_length( std::uint64_t n); @@ -160,7 +160,7 @@ class BOOST_HTTP_PROTO_DECL message_base @param value The value to set. */ - BOOST_HTTP_PROTO_DECL + void set_chunked(bool value); @@ -182,7 +182,7 @@ class BOOST_HTTP_PROTO_DECL message_base @param value The value to set. */ - BOOST_HTTP_PROTO_DECL + void set_keep_alive(bool value); }; From e6be3bdd8ad7808c9b4a132b34bd0c3dff8bb02e Mon Sep 17 00:00:00 2001 From: Sergio DuBois Date: Fri, 5 Dec 2025 11:22:18 -0500 Subject: [PATCH 13/23] Export fields_base and drop member exports --- include/boost/http_proto/fields_base.hpp | 86 ++++++++++++------------ 1 file changed, 43 insertions(+), 43 deletions(-) diff --git a/include/boost/http_proto/fields_base.hpp b/include/boost/http_proto/fields_base.hpp index 01b96f04..6e9ebe42 100644 --- a/include/boost/http_proto/fields_base.hpp +++ b/include/boost/http_proto/fields_base.hpp @@ -32,7 +32,7 @@ namespace http_proto { @note HTTP field names are case-insensitive. */ -class fields_base +class BOOST_HTTP_PROTO_DECL fields_base { detail::header h_; std::size_t max_cap_ = @@ -74,32 +74,32 @@ class fields_base friend class parser; friend class serializer; - BOOST_HTTP_PROTO_DECL + explicit fields_base( detail::kind k) noexcept; - BOOST_HTTP_PROTO_DECL + fields_base( detail::kind k, void* storage, std::size_t cap) noexcept; - BOOST_HTTP_PROTO_DECL + fields_base( detail::kind k, core::string_view s); - BOOST_HTTP_PROTO_DECL + explicit fields_base( detail::header const& h); - BOOST_HTTP_PROTO_DECL + fields_base( fields_base const&); - BOOST_HTTP_PROTO_DECL + fields_base( detail::header const& h, void* storage, @@ -168,7 +168,7 @@ class fields_base std::string value; /// Constructor. - BOOST_HTTP_PROTO_DECL + value_type( reference const& other); @@ -211,7 +211,7 @@ class fields_base /** Destructor. */ - BOOST_HTTP_PROTO_DECL + ~fields_base(); //-------------------------------------------- @@ -283,7 +283,7 @@ class fields_base @param id The field name constant. */ - BOOST_HTTP_PROTO_DECL + core::string_view at(field id) const; @@ -305,13 +305,13 @@ class fields_base @param name The field name. */ - BOOST_HTTP_PROTO_DECL + core::string_view at(core::string_view name) const; /** Return true if a field exists. */ - BOOST_HTTP_PROTO_DECL + bool exists(field id) const noexcept; @@ -323,7 +323,7 @@ class fields_base @param name The field name. */ - BOOST_HTTP_PROTO_DECL + bool exists( core::string_view name) const noexcept; @@ -332,7 +332,7 @@ class fields_base @param id The field name constant. */ - BOOST_HTTP_PROTO_DECL + std::size_t count(field id) const noexcept; @@ -344,7 +344,7 @@ class fields_base @param name The field name. */ - BOOST_HTTP_PROTO_DECL + std::size_t count( core::string_view name) const noexcept; @@ -353,7 +353,7 @@ class fields_base @param id The field name constant. */ - BOOST_HTTP_PROTO_DECL + iterator find(field id) const noexcept; @@ -365,7 +365,7 @@ class fields_base @param name The field name. */ - BOOST_HTTP_PROTO_DECL + iterator find( core::string_view name) const noexcept; @@ -377,7 +377,7 @@ class fields_base @param id The field name constant. */ - BOOST_HTTP_PROTO_DECL + iterator find( iterator from, @@ -394,7 +394,7 @@ class fields_base @param name The field name. */ - BOOST_HTTP_PROTO_DECL + iterator find( iterator from, @@ -408,7 +408,7 @@ class fields_base @param id The field name constant. */ - BOOST_HTTP_PROTO_DECL + iterator find_last( iterator before, @@ -426,7 +426,7 @@ class fields_base @param name The field name. */ - BOOST_HTTP_PROTO_DECL + iterator find_last( iterator before, @@ -439,7 +439,7 @@ class fields_base @param s The value to be returned if field does not exist. */ - BOOST_HTTP_PROTO_DECL + core::string_view value_or( field id, @@ -456,7 +456,7 @@ class fields_base @param s The value to be returned if field does not exist. */ - BOOST_HTTP_PROTO_DECL + core::string_view value_or( core::string_view name, @@ -466,7 +466,7 @@ class fields_base @param id The field name constant. */ - BOOST_HTTP_PROTO_DECL + subrange find_all(field id) const noexcept; @@ -478,7 +478,7 @@ class fields_base @param name The field name. */ - BOOST_HTTP_PROTO_DECL + subrange find_all( core::string_view name) const noexcept; @@ -519,7 +519,7 @@ class fields_base @par Complexity Constant. */ - BOOST_HTTP_PROTO_DECL + void clear() noexcept; @@ -545,7 +545,7 @@ class fields_base @param n The capacity in bytes. */ - BOOST_HTTP_PROTO_DECL + void reserve_bytes(std::size_t n); @@ -574,7 +574,7 @@ class fields_base @param n The maximum allowed capacity in bytes. */ - BOOST_HTTP_PROTO_DECL + void set_max_capacity_in_bytes(std::size_t n); @@ -584,7 +584,7 @@ class fields_base Strong guarantee. Calls to allocate may throw. */ - BOOST_HTTP_PROTO_DECL + void shrink_to_fit(); @@ -835,7 +835,7 @@ class fields_base @param value The value which must be semantically valid for the message. */ - BOOST_HTTP_PROTO_DECL + iterator insert( iterator before, @@ -884,7 +884,7 @@ class fields_base @param ec Set to the error if input is invalid. */ - BOOST_HTTP_PROTO_DECL + iterator insert( iterator before, @@ -936,7 +936,7 @@ class fields_base @param value The value which must be semantically valid for the message. */ - BOOST_HTTP_PROTO_DECL + iterator insert( iterator before, @@ -985,7 +985,7 @@ class fields_base @param ec Set to the error if input is invalid. */ - BOOST_HTTP_PROTO_DECL + iterator insert( iterator before, @@ -1012,7 +1012,7 @@ class fields_base @param it The iterator to the element to erase. */ - BOOST_HTTP_PROTO_DECL + iterator erase(iterator it) noexcept; @@ -1033,7 +1033,7 @@ class fields_base @param id The field name constant. */ - BOOST_HTTP_PROTO_DECL + std::size_t erase(field id) noexcept; @@ -1054,7 +1054,7 @@ class fields_base @param name The header name. */ - BOOST_HTTP_PROTO_DECL + std::size_t erase( core::string_view name) noexcept; @@ -1091,7 +1091,7 @@ class fields_base @param value The value which must be semantically valid for the message. */ - BOOST_HTTP_PROTO_DECL + void set(iterator it, core::string_view value); @@ -1123,7 +1123,7 @@ class fields_base @param ec Set to the error if input is invalid. */ - BOOST_HTTP_PROTO_DECL + void set( iterator it, @@ -1210,7 +1210,7 @@ class fields_base @param ec Set to the error if input is invalid. */ - BOOST_HTTP_PROTO_DECL + void set( field id, @@ -1296,7 +1296,7 @@ class fields_base @param ec Set to the error if input is invalid. */ - BOOST_HTTP_PROTO_DECL + void set( core::string_view name, @@ -1337,19 +1337,19 @@ class fields_base @param f The container to write. */ friend - BOOST_HTTP_PROTO_DECL + std::ostream& operator<<( std::ostream& os, const fields_base& f); private: - BOOST_HTTP_PROTO_DECL + void copy_impl( detail::header const&); - BOOST_HTTP_PROTO_DECL + void insert_impl( optional id, From a6eba4992178de54ffbdd0321d357128dbe50bb9 Mon Sep 17 00:00:00 2001 From: Sergio DuBois Date: Fri, 5 Dec 2025 11:29:06 -0500 Subject: [PATCH 14/23] Export detail::header to satisfy dll-interface --- include/boost/http_proto/detail/header.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/boost/http_proto/detail/header.hpp b/include/boost/http_proto/detail/header.hpp index 7c54bb63..11444288 100644 --- a/include/boost/http_proto/detail/header.hpp +++ b/include/boost/http_proto/detail/header.hpp @@ -28,7 +28,7 @@ namespace boost { namespace http_proto { class fields_base; -struct header_limits; +struct BOOST_HTTP_PROTO_DECL header_limits; namespace detail { @@ -44,7 +44,7 @@ struct empty kind param; }; -struct header +struct BOOST_HTTP_PROTO_DECL header { // +------------+---------+------+------------+-----------------------------+ // | start-line | headers | \r\n | free space | entry[count-1] ... entry[0] | From 9126ea03001f0c7baf9938be33fb97bb6453e874 Mon Sep 17 00:00:00 2001 From: Sergio DuBois Date: Fri, 5 Dec 2025 11:38:43 -0500 Subject: [PATCH 15/23] Fix Windows exports for header members --- include/boost/http_proto/detail/header.hpp | 4 ---- include/boost/http_proto/header_limits.hpp | 1 - 2 files changed, 5 deletions(-) diff --git a/include/boost/http_proto/detail/header.hpp b/include/boost/http_proto/detail/header.hpp index 11444288..8498af62 100644 --- a/include/boost/http_proto/detail/header.hpp +++ b/include/boost/http_proto/detail/header.hpp @@ -157,20 +157,16 @@ struct BOOST_HTTP_PROTO_DECL header static header& get(fields_base& f) noexcept; - BOOST_HTTP_PROTO_DECL static header const* get_default(detail::kind k) noexcept; // called from parser explicit header(empty) noexcept; - BOOST_HTTP_PROTO_DECL header(detail::kind) noexcept; - BOOST_HTTP_PROTO_DECL void swap(header&) noexcept; - BOOST_HTTP_PROTO_DECL bool keep_alive() const noexcept; static std::size_t bytes_needed( diff --git a/include/boost/http_proto/header_limits.hpp b/include/boost/http_proto/header_limits.hpp index 0f8be356..035cc7a4 100644 --- a/include/boost/http_proto/header_limits.hpp +++ b/include/boost/http_proto/header_limits.hpp @@ -116,7 +116,6 @@ struct header_limits number of contiguous bytes of storage that would be needed at these settings. */ - BOOST_HTTP_PROTO_DECL std::size_t valid_space_needed() const; }; From 94777b8685cf4e692412d44e8c069021bdafaba7 Mon Sep 17 00:00:00 2001 From: Sergio DuBois Date: Fri, 5 Dec 2025 11:45:26 -0500 Subject: [PATCH 16/23] Export route_params base and task to silence MSVC C4251 --- include/boost/http_proto/server/router_types.hpp | 3 ++- src/server/route_handler.cpp | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/include/boost/http_proto/server/router_types.hpp b/include/boost/http_proto/server/router_types.hpp index e98fd8fa..58bb4273 100644 --- a/include/boost/http_proto/server/router_types.hpp +++ b/include/boost/http_proto/server/router_types.hpp @@ -17,6 +17,7 @@ #include #include #include +#include #include namespace boost { @@ -296,7 +297,7 @@ class basic_router; This is a required public base for any `Request` type used with @ref basic_router. */ -class route_params_base +class BOOST_HTTP_PROTO_DECL route_params_base { public: /** The mount path of the current router diff --git a/src/server/route_handler.cpp b/src/server/route_handler.cpp index 5aad08e1..9036d967 100644 --- a/src/server/route_handler.cpp +++ b/src/server/route_handler.cpp @@ -20,6 +20,9 @@ route_params:: { } +route_params::task:: +~task() = default; + route_params& route_params:: status( From 4b17660b88de2d5fa956920147a448e02c2b0b29 Mon Sep 17 00:00:00 2001 From: Sergio DuBois Date: Fri, 5 Dec 2025 11:48:44 -0500 Subject: [PATCH 17/23] Make route_params::task dtor out-of-line --- include/boost/http_proto/server/route_handler.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/boost/http_proto/server/route_handler.hpp b/include/boost/http_proto/server/route_handler.hpp index 1d162c57..59c3f1fe 100644 --- a/include/boost/http_proto/server/route_handler.hpp +++ b/include/boost/http_proto/server/route_handler.hpp @@ -145,7 +145,7 @@ struct BOOST_HTTP_PROTO_DECL */ struct BOOST_HTTP_PROTO_DECL task { - virtual ~task() = default; + virtual ~task(); /** Invoke the task. From cf943895da372b75ea25ca39336746b0425ba8c4 Mon Sep 17 00:00:00 2001 From: Sergio DuBois Date: Fri, 5 Dec 2025 11:53:10 -0500 Subject: [PATCH 18/23] Export header_limits at definition; fix forward decl --- include/boost/http_proto/header_limits.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/boost/http_proto/header_limits.hpp b/include/boost/http_proto/header_limits.hpp index 035cc7a4..cddfe595 100644 --- a/include/boost/http_proto/header_limits.hpp +++ b/include/boost/http_proto/header_limits.hpp @@ -21,7 +21,7 @@ namespace http_proto { Objects of this type are used to configure upper limits for HTTP headers. */ -struct header_limits +struct BOOST_HTTP_PROTO_DECL header_limits { /** Largest allowed size for complete headers. From 90caa4cfc3e063695a1cf5f62c0b9b9ec00fee47 Mon Sep 17 00:00:00 2001 From: Sergio DuBois Date: Fri, 5 Dec 2025 13:50:23 -0500 Subject: [PATCH 19/23] Add MSVC macros to silence DLL-interface warnings --- include/boost/http_proto/server/route_handler.hpp | 3 ++- include/boost/http_proto/server/router_types.hpp | 6 ++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/include/boost/http_proto/server/route_handler.hpp b/include/boost/http_proto/server/route_handler.hpp index 59c3f1fe..3c4bee05 100644 --- a/include/boost/http_proto/server/route_handler.hpp +++ b/include/boost/http_proto/server/route_handler.hpp @@ -30,7 +30,8 @@ struct acceptor_config bool is_admin; }; -//----------------------------------------------- +BOOST_HTTP_PROTO_MSVC_WARNING_PUSH +BOOST_HTTP_PROTO_MSVC_DISABLE_4251_4275 /** Parameters object for HTTP route handlers */ diff --git a/include/boost/http_proto/server/router_types.hpp b/include/boost/http_proto/server/router_types.hpp index 58bb4273..eef0b25c 100644 --- a/include/boost/http_proto/server/router_types.hpp +++ b/include/boost/http_proto/server/router_types.hpp @@ -292,6 +292,9 @@ class any_router; template class basic_router; +BOOST_HTTP_PROTO_MSVC_WARNING_PUSH +BOOST_HTTP_PROTO_MSVC_DISABLE_4251_4275 + /** Base class for request objects This is a required public base for any `Request` @@ -334,6 +337,9 @@ class BOOST_HTTP_PROTO_DECL route_params_base bool strict = false; }; + +BOOST_HTTP_PROTO_MSVC_WARNING_POP + } // http_proto } // boost From e1b53f561986b34a69b04c999200fa8505847b10 Mon Sep 17 00:00:00 2001 From: Sergio DuBois Date: Fri, 5 Dec 2025 14:07:39 -0500 Subject: [PATCH 20/23] Define MSVC warning suppression macros in config --- include/boost/http_proto/detail/config.hpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/include/boost/http_proto/detail/config.hpp b/include/boost/http_proto/detail/config.hpp index 2a3f0ad3..fe554484 100644 --- a/include/boost/http_proto/detail/config.hpp +++ b/include/boost/http_proto/detail/config.hpp @@ -33,6 +33,18 @@ namespace http_proto { # define BOOST_HTTP_PROTO_DECL # endif +// MSVC-only helpers to locally suppress benign DLL-interface warnings +# if defined(BOOST_MSVC) +# define BOOST_HTTP_PROTO_MSVC_WARNING_PUSH __pragma(warning(push)) +# define BOOST_HTTP_PROTO_MSVC_WARNING_POP __pragma(warning(pop)) +# define BOOST_HTTP_PROTO_MSVC_DISABLE_4251_4275 \ + __pragma(warning(disable:4251 4275)) +# else +# define BOOST_HTTP_PROTO_MSVC_WARNING_PUSH +# define BOOST_HTTP_PROTO_MSVC_WARNING_POP +# define BOOST_HTTP_PROTO_MSVC_DISABLE_4251_4275 +# endif + # if !defined(BOOST_HTTP_PROTO_SOURCE) && !defined(BOOST_ALL_NO_LIB) && !defined(BOOST_HTTP_PROTO_NO_LIB) # define BOOST_LIB_NAME boost_http_proto # if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_HTTP_PROTO_DYN_LINK) From f3e5e60212df026724494c54760519e8b0e36490 Mon Sep 17 00:00:00 2001 From: Sergio DuBois Date: Fri, 5 Dec 2025 14:13:39 -0500 Subject: [PATCH 21/23] Fix header_limits forward decl for MinGW --- include/boost/http_proto/detail/header.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/boost/http_proto/detail/header.hpp b/include/boost/http_proto/detail/header.hpp index 8498af62..a70379e4 100644 --- a/include/boost/http_proto/detail/header.hpp +++ b/include/boost/http_proto/detail/header.hpp @@ -28,7 +28,7 @@ namespace boost { namespace http_proto { class fields_base; -struct BOOST_HTTP_PROTO_DECL header_limits; +struct header_limits; namespace detail { From 88407633555387504a44ebdc80631b159fd475e6 Mon Sep 17 00:00:00 2001 From: Sergio DuBois Date: Fri, 5 Dec 2025 14:20:41 -0500 Subject: [PATCH 22/23] Export fields_base ostream operator for shared builds --- include/boost/http_proto/fields_base.hpp | 1 + src/fields_base.cpp | 1 + 2 files changed, 2 insertions(+) diff --git a/include/boost/http_proto/fields_base.hpp b/include/boost/http_proto/fields_base.hpp index 6e9ebe42..8ce5fb31 100644 --- a/include/boost/http_proto/fields_base.hpp +++ b/include/boost/http_proto/fields_base.hpp @@ -1338,6 +1338,7 @@ class BOOST_HTTP_PROTO_DECL fields_base */ friend + BOOST_HTTP_PROTO_DECL std::ostream& operator<<( std::ostream& os, diff --git a/src/fields_base.cpp b/src/fields_base.cpp index ba62e591..6e069b29 100644 --- a/src/fields_base.cpp +++ b/src/fields_base.cpp @@ -850,6 +850,7 @@ find_all( &h_, find(name).i_); } +BOOST_HTTP_PROTO_DECL std::ostream& operator<<( std::ostream& os, From f9a0f32dbeeadfd8c7636b0e2cd001ff3cebe80f Mon Sep 17 00:00:00 2001 From: Sergio DuBois Date: Fri, 5 Dec 2025 14:43:01 -0500 Subject: [PATCH 23/23] Silence MSVC C4251 for detail::header metadata member --- include/boost/http_proto/detail/header.hpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/boost/http_proto/detail/header.hpp b/include/boost/http_proto/detail/header.hpp index a70379e4..e769d664 100644 --- a/include/boost/http_proto/detail/header.hpp +++ b/include/boost/http_proto/detail/header.hpp @@ -44,6 +44,9 @@ struct empty kind param; }; +BOOST_HTTP_PROTO_MSVC_WARNING_PUSH +BOOST_HTTP_PROTO_MSVC_DISABLE_4251_4275 + struct BOOST_HTTP_PROTO_DECL header { // +------------+---------+------+------------+-----------------------------+ @@ -218,6 +221,8 @@ struct BOOST_HTTP_PROTO_DECL header system::error_code&) noexcept; }; +BOOST_HTTP_PROTO_MSVC_WARNING_POP + } // detail } // http_proto } // boost