From 0ae1a735f6eb533d790d8e39c336fc0eee7228e3 Mon Sep 17 00:00:00 2001 From: Mohammad Nejati Date: Fri, 6 Jun 2025 14:49:10 +0000 Subject: [PATCH] Remove superfluous uses of BOOST_SYMBOL_VISIBLE --- .azure-pipelines.yml | 196 ------------------ .github/workflows/ci.yml | 30 +-- include/boost/http_proto/fields_view.hpp | 3 +- .../boost/http_proto/message_view_base.hpp | 3 +- include/boost/http_proto/parser.hpp | 3 +- include/boost/http_proto/request_parser.hpp | 3 +- include/boost/http_proto/request_view.hpp | 5 +- include/boost/http_proto/response_parser.hpp | 3 +- include/boost/http_proto/response_view.hpp | 3 +- include/boost/http_proto/serializer.hpp | 3 +- include/boost/http_proto/service/service.hpp | 3 +- .../boost/http_proto/service/zlib_service.hpp | 2 +- include/boost/http_proto/sink.hpp | 3 +- include/boost/http_proto/source.hpp | 3 +- test/unit/request_parser.cpp | 4 +- 15 files changed, 33 insertions(+), 234 deletions(-) delete mode 100644 .azure-pipelines.yml diff --git a/.azure-pipelines.yml b/.azure-pipelines.yml deleted file mode 100644 index 83903c50..00000000 --- a/.azure-pipelines.yml +++ /dev/null @@ -1,196 +0,0 @@ ---- -# Copyright 2015-2019 Rene Rivera. -# Copyright 2019 Mateusz Loskot -# Copyright 2020-2021 Alexander Grund -# Distributed under the Boost Software License, Version 1.0. -# (See accompanying file LICENSE_1_0.txt or copy at http://boost.org/LICENSE_1_0.txt) - -# -# Generic Azure Pipelines build script for boostorg repositories -# See: https://github.com/boostorg/boost-ci/ -# -# Instructions for customizing this script for your library: -# -# 1. Customize the compilers and language levels you want. -# 2. If you have more than include/, src/, test/, example/, examples/, -# benchmark/ or tools/ directories, set the environment variable DEPINST. -# For example if your build uses code in "bench/" and "fog/" directories: -# - DEPINST: --include bench --include fog -# 3. Enable pull request builds in your boostorg/ account. -# -# That's it - the script will do everything else for you. - -trigger: - branches: - include: - - develop - - master - - bugfix/* - - feature/* - - fix/* - - pr/* - -pr: [develop, master, main] - -variables: - GIT_FETCH_JOBS: 4 - NET_RETRY_COUNT: 5 - B2_CI_VERSION: 1 - B2_VARIANT: release,debug - B2_LINK: shared,static - -# Dummy runtime parameter to allow creating conditional jobs -parameters: - - name: jobs - type: object - default: - - { compiler: gcc-11, cxxstd: '14,17,20', os: ubuntu-20.04 } - - { compiler: gcc-10, cxxstd: '14,17,20', os: ubuntu-20.04 } - - { compiler: gcc-9, cxxstd: '14,17,2a', os: ubuntu-20.04 } - - { compiler: gcc-8, cxxstd: '14,17,2a', os: ubuntu-20.04 } - - { compiler: gcc-7, cxxstd: '11,14,17', os: ubuntu-18.04 } - - { compiler: gcc-6, cxxstd: '11,14', os: ubuntu-18.04 } - - { compiler: gcc-5, cxxstd: '11', os: ubuntu-18.04 } - - { compiler: gcc-4.9, cxxstd: '11', os: ubuntu-18.04, container: 'ubuntu:16.04' } - - { compiler: gcc-4.8, cxxstd: '11', os: ubuntu-18.04 } - - { compiler: clang-12, cxxstd: '14,17,20', os: ubuntu-20.04 } - - { compiler: clang-11, cxxstd: '14,17,20', os: ubuntu-20.04 } - - { compiler: clang-10, cxxstd: '14,17,20', os: ubuntu-20.04 } - - { compiler: clang-9, cxxstd: '14,17,2a', os: ubuntu-20.04 } - - { compiler: clang-8, cxxstd: '14,17', os: ubuntu-18.04, install: 'clang-8 libc6-dbg libc++-dev libstdc++-8-dev' } - - { compiler: clang-7, cxxstd: '14,17', os: ubuntu-18.04, install: 'clang-7 libc6-dbg libc++-dev libstdc++-8-dev' } - - { compiler: clang-6.0, cxxstd: '11,14,17', os: ubuntu-18.04, install: 'clang-6.0 libc6-dbg libc++-dev libc++abi-dev libstdc++-8-dev' } - - { name: Linux_clang_6_libcxx, - compiler: clang-6.0, cxxstd: '11,14,17', os: ubuntu-18.04, install: 'clang-6.0 libc6-dbg libc++-dev libc++abi-dev libstdc++-8-dev', env: {B2_STDLIB: libc++ } } - - { compiler: clang-5.0, cxxstd: '11,14,17', os: ubuntu-18.04 } - - { compiler: clang-4.0, cxxstd: '11,14', os: ubuntu-18.04 } - - { compiler: clang-3.9, cxxstd: '11,14', os: ubuntu-18.04 } - - { compiler: clang-3.8, cxxstd: '11,14', os: ubuntu-18.04, container: 'ubuntu:16.04' } - - { compiler: clang-3.7, cxxstd: '11', os: ubuntu-18.04, container: 'ubuntu:16.04' } - - { compiler: clang-3.6, cxxstd: '11', os: ubuntu-18.04, container: 'ubuntu:16.04' } - - { compiler: clang-3.5, cxxstd: '11', os: ubuntu-18.04, container: 'ubuntu:16.04' } - # OSX - - { compiler: clang, cxxstd: '14,17,2a', os: macOS-10.15, xcode: 12.4 } - - { compiler: clang, cxxstd: '14,17,2a', os: macOS-10.15, xcode: 12.3 } - - { compiler: clang, cxxstd: '14,17,2a', os: macOS-10.15, xcode: 12.2 } - - { compiler: clang, cxxstd: '14,17,2a', os: macOS-10.15, xcode: 12.1.1 } - - { compiler: clang, cxxstd: '14,17,2a', os: macOS-10.15, xcode: 12.0.1 } - - { compiler: clang, cxxstd: '14,17,2a', os: macOS-10.15, xcode: 11.7 } - - { compiler: clang, cxxstd: '14,17,2a', os: macOS-10.15, xcode: 11.6 } - - { compiler: clang, cxxstd: '14,17,2a', os: macOS-10.15, xcode: 11.5 } - - { compiler: clang, cxxstd: '14,17,2a', os: macOS-10.15, xcode: 11.4.1 } - - { compiler: clang, cxxstd: '14,17,2a', os: macOS-10.15, xcode: 11.3.1 } - - { compiler: clang, cxxstd: '14,17,2a', os: macOS-10.15, xcode: 11.2.1 } - - { compiler: clang, cxxstd: '14,17,2a', os: macOS-10.15, xcode: 11.3 } - -stages: - - stage: Test - jobs: - # Dynamically generate jobs to be able to insert containers, see https://stackoverflow.com/questions/70046143 - - ${{ each item in parameters.jobs }}: - - ${{ if item.name }}: - job: ${{ item.name }} - ${{ elseif contains(item.os, 'macOS') }}: - job: macOS_${{ replace(item.xcode, '.', '_') }} - ${{ else }}: - job: Linux_${{ replace(replace(item.compiler, '-', '_'), '.', '_') }} - pool: - vmImage: ${{ item.os }} - ${{ if item.container }}: - container: - image: ${{ item.container }} - # Workaround for missing sudo: https://github.com/microsoft/azure-pipelines-agent/issues/2043 - options: --name ci-container -v /usr/bin/docker:/tmp/docker:ro - variables: - B2_COMPILER: ${{ item.compiler }} - B2_CXXSTD: ${{ item.cxxstd }} - ${{ if not(contains(item.os, 'macOS')) }}: - B2_USE_CCACHE: 1 - B2_CCACHE_DIR: $(Pipeline.Workspace)/.ccache - ${{ if item.xcode }}: - XCODE_APP: /Applications/Xcode_${{ item.xcode }}.app - ${{ if item.install }}: - PACKAGES: ${{ item.install }} - ${{ each var in item.env }}: - ${{var.Key}}: ${{var.Value}} - steps: - - ${{ if item.container }}: - - bash: | - set -ex - /tmp/docker exec -t -u 0 ci-container \ - sh -c "apt-get update && DEBIAN_FRONTEND=noninteractive apt-get -o Dpkg::Options::='--force-confold' -y install sudo software-properties-common" - # Need (newer) git - sudo add-apt-repository ppa:git-core/ppa - sudo apt-get -o Acquire::Retries=$NET_RETRY_COUNT update - sudo apt-get -o Acquire::Retries=$NET_RETRY_COUNT install -y g++ python libpython-dev git - displayName: 'Install required sw for containers' - - task: Cache@2 - condition: eq(variables.B2_USE_CCACHE, '1') - inputs: - key: 'ccache|"${{ item.os }}-${{ item.container }}"|"${{ item.compiler }}"' - path: $(B2_CCACHE_DIR) - displayName: Get CCache - - bash: | - set -ex - - for i in {1..$NET_RETRY_COUNT}; do - git clone --depth 1 --branch master https://github.com/boostorg/boost-ci.git boost-ci-cloned && break || sleep 10 - done - # Copy ci folder if not testing Boost.CI - [[ $(basename "$BUILD_REPOSITORY_NAME") = "boost-ci" ]] || cp -prf boost-ci-cloned/ci . - rm -rf boost-ci-cloned - source ci/azure-pipelines/install.sh - displayName: 'Install' - - bash: | - set -ex - - echo "customization - url" - cd $BOOST_ROOT/libs - git clone https://github.com/CPPAlliance/url -b develop - echo "end customization - url" - - echo "SELF=$SELF" - echo "BOOST_ROOT=$BOOST_ROOT" - cd $BOOST_ROOT/libs/$SELF - ci/azure-pipelines/build.sh - displayName: 'Build' - - - job: 'Windows' - timeoutInMinutes: 120 - strategy: - matrix: - VS_2022: - B2_TOOLSET: msvc-14.3 - B2_CXXSTD: 14,17,20 - B2_ADDRESS_MODEL: 32,64 - VM_IMAGE: 'windows-2022' - VS_2022_strict: - B2_TOOLSET: msvc-14.3 - B2_CXXSTD: 14,17,20 - B2_CXXFLAGS: -permissive- - B2_ADDRESS_MODEL: 32,64 - VM_IMAGE: 'windows-2022' - VS_2019: - B2_TOOLSET: msvc-14.2 - B2_CXXSTD: 14,17,20 - B2_ADDRESS_MODEL: 32,64 - VM_IMAGE: 'windows-2019' - VS_2019_strict: - B2_TOOLSET: msvc-14.2 - B2_CXXSTD: 14,17,20 - B2_CXXFLAGS: -permissive- - B2_ADDRESS_MODEL: 32,64 - VM_IMAGE: 'windows-2019' - - pool: - vmImage: $(VM_IMAGE) - steps: - - script: | - git clone --depth 1 --branch master https://github.com/boostorg/boost-ci.git boost-ci-cloned - REM Copy ci folder if not testing Boost.CI - if "%BUILD_REPOSITORY_NAME%" == "%BUILD_REPOSITORY_NAME:boost-ci=%" xcopy /s /e /q /i /y boost-ci-cloned\ci .\ci - rmdir /s /q boost-ci-cloned - ci\azure-pipelines\install.bat - displayName: 'Install' - - script: ci\build.bat - displayName: 'Build' diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1229dce8..2ab54572 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -829,7 +829,7 @@ jobs: ref: develop - name: Setup C++ - uses: alandefreitas/cpp-actions/setup-cpp@v1.8.8 + uses: alandefreitas/cpp-actions/setup-cpp@v1.8.10 id: setup-cpp with: compiler: ${{ matrix.compiler }} @@ -838,7 +838,7 @@ jobs: trace-commands: true - name: Install packages - uses: alandefreitas/cpp-actions/package-install@v1.8.8 + uses: alandefreitas/cpp-actions/package-install@v1.8.10 id: package-install with: apt-get-add-architecture: 'i386' @@ -847,12 +847,12 @@ jobs: build-essential - name: Clone Boost - uses: alandefreitas/cpp-actions/boost-clone@v1.8.8 + uses: alandefreitas/cpp-actions/boost-clone@v1.8.10 id: boost-clone with: branch: ${{ (github.ref_name == 'master' && github.ref_name) || 'develop' }} boost-dir: boost-source - cache: false + cache: true modules-exclude-paths: '' scan-modules-dir: | http-proto-root @@ -862,7 +862,7 @@ jobs: buffers - name: Install zlib (Windows) - uses: alandefreitas/cpp-actions/package-install@v1.8.8 + uses: alandefreitas/cpp-actions/package-install@v1.8.10 if: ${{ startsWith(matrix.runs-on, 'windows') && !matrix.skip-zlib }} id: zlib-install with: @@ -927,7 +927,7 @@ jobs: cp -r "$workspace_root"/buffers-root libs/buffers - name: Boost B2 Workflow - uses: alandefreitas/cpp-actions/b2-workflow@v1.8.8 + uses: alandefreitas/cpp-actions/b2-workflow@v1.8.10 if: ${{ !matrix.coverage && !matrix.time-trace }} env: ASAN_OPTIONS: ${{ ((matrix.compiler == 'apple-clang' || matrix.compiler == 'clang') && 'detect_invalid_pointer_pairs=0:strict_string_checks=1:detect_stack_use_after_return=1:check_initialization_order=1:strict_init_order=1') || 'detect_invalid_pointer_pairs=2:strict_string_checks=1:detect_stack_use_after_return=1:check_initialization_order=1:strict_init_order=1' }} @@ -949,7 +949,7 @@ jobs: extra-args: ${{ (matrix.valgrind && 'testing.launcher=valgrind' || '' )}} - name: Boost CMake Workflow - uses: alandefreitas/cpp-actions/cmake-workflow@v1.8.8 + uses: alandefreitas/cpp-actions/cmake-workflow@v1.8.10 if: ${{ matrix.coverage || matrix.time-trace || matrix.build-cmake || matrix.is-earliest }} with: source-dir: boost-root @@ -986,7 +986,7 @@ jobs: echo "LD_LIBRARY_PATH=$GITHUB_WORKSPACE/.local/lib:$LD_LIBRARY_PATH" >> "$GITHUB_ENV" - name: Find Package Integration Workflow - uses: alandefreitas/cpp-actions/cmake-workflow@v1.8.8 + uses: alandefreitas/cpp-actions/cmake-workflow@v1.8.10 if: ${{ matrix.build-cmake || matrix.is-earliest }} with: source-dir: boost-root/libs/${{ steps.patch.outputs.module }}/test/cmake_test @@ -1010,7 +1010,7 @@ jobs: toolchain: ${{ (startsWith(matrix.runs-on, 'windows') && steps.patch-user-config.outputs.toolchain) || '' }} - name: Subdirectory Integration Workflow - uses: alandefreitas/cpp-actions/cmake-workflow@v1.8.8 + uses: alandefreitas/cpp-actions/cmake-workflow@v1.8.10 if: ${{ matrix.build-cmake || matrix.is-earliest }} with: source-dir: boost-root/libs/${{ steps.patch.outputs.module }}/test/cmake_test @@ -1031,7 +1031,7 @@ jobs: toolchain: ${{ (startsWith(matrix.runs-on, 'windows') && steps.patch-user-config.outputs.toolchain) || '' }} - name: Root Project CMake Workflow - uses: alandefreitas/cpp-actions/cmake-workflow@v1.8.8 + uses: alandefreitas/cpp-actions/cmake-workflow@v1.8.10 if: ${{ matrix.build-cmake || matrix.is-earliest }} with: source-dir: boost-root/libs/${{ steps.patch.outputs.module }} @@ -1055,7 +1055,7 @@ jobs: toolchain: ${{ (startsWith(matrix.runs-on, 'windows') && steps.patch-user-config.outputs.toolchain) || '' }} - name: FlameGraph - uses: alandefreitas/cpp-actions/flamegraph@v1.8.8 + uses: alandefreitas/cpp-actions/flamegraph@v1.8.10 if: matrix.time-trace with: source-dir: boost-root/libs/http_proto @@ -1108,7 +1108,7 @@ jobs: fetch-depth: 100 - name: Changelog - uses: alandefreitas/cpp-actions/create-changelog@v1.8.8 + uses: alandefreitas/cpp-actions/create-changelog@v1.8.10 with: thank-non-regular: ${{ startsWith(github.ref, 'refs/tags/') }} github-token: ${{ secrets.GITHUB_TOKEN }} @@ -1131,7 +1131,7 @@ jobs: shell: bash steps: - name: Install packages - uses: alandefreitas/cpp-actions/package-install@v1.8.8 + uses: alandefreitas/cpp-actions/package-install@v1.8.10 with: apt-get: git cmake @@ -1148,12 +1148,12 @@ jobs: ref: develop - name: Clone Boost - uses: alandefreitas/cpp-actions/boost-clone@v1.8.8 + uses: alandefreitas/cpp-actions/boost-clone@v1.8.10 id: boost-clone with: branch: ${{ (github.ref_name == 'master' && github.ref_name) || 'develop' }} boost-dir: boost-source - cache: false + cache: true modules-exclude-paths: '' scan-modules-dir: | http-proto-root diff --git a/include/boost/http_proto/fields_view.hpp b/include/boost/http_proto/fields_view.hpp index fc210b6a..3ec3ebe4 100644 --- a/include/boost/http_proto/fields_view.hpp +++ b/include/boost/http_proto/fields_view.hpp @@ -19,8 +19,7 @@ namespace http_proto { /** A read-only, forward range of HTTP fields */ -class BOOST_SYMBOL_VISIBLE - fields_view +class fields_view : public fields_view_base { friend class fields; diff --git a/include/boost/http_proto/message_view_base.hpp b/include/boost/http_proto/message_view_base.hpp index 38379f45..a148a919 100644 --- a/include/boost/http_proto/message_view_base.hpp +++ b/include/boost/http_proto/message_view_base.hpp @@ -23,8 +23,7 @@ namespace http_proto { /** Provides message metadata for requests and responses */ -class BOOST_SYMBOL_VISIBLE - message_view_base +class message_view_base : public virtual fields_view_base { friend class request_view; diff --git a/include/boost/http_proto/parser.hpp b/include/boost/http_proto/parser.hpp index 4c77fd7a..b77b11da 100644 --- a/include/boost/http_proto/parser.hpp +++ b/include/boost/http_proto/parser.hpp @@ -74,8 +74,7 @@ class filter; according to the documented HTTP ABNFs is treated as an unrecoverable error. */ -class BOOST_SYMBOL_VISIBLE - parser +class parser { public: /** Parser configuration settings. diff --git a/include/boost/http_proto/request_parser.hpp b/include/boost/http_proto/request_parser.hpp index b14cbf4f..d1c08fa0 100644 --- a/include/boost/http_proto/request_parser.hpp +++ b/include/boost/http_proto/request_parser.hpp @@ -21,8 +21,7 @@ namespace boost { namespace http_proto { -class BOOST_SYMBOL_VISIBLE - request_parser +class request_parser : public parser { public: diff --git a/include/boost/http_proto/request_view.hpp b/include/boost/http_proto/request_view.hpp index 0dea8f74..f659ce89 100644 --- a/include/boost/http_proto/request_view.hpp +++ b/include/boost/http_proto/request_view.hpp @@ -19,8 +19,7 @@ namespace http_proto { /** A read-only reference to an HTTP request */ -class BOOST_SYMBOL_VISIBLE - request_view +class request_view : public message_view_base { friend class request_base; @@ -88,7 +87,7 @@ class BOOST_SYMBOL_VISIBLE /** Return the request-target string */ core::string_view - target_text() const noexcept + target() const noexcept { return core::string_view( ph_->cbuf + diff --git a/include/boost/http_proto/response_parser.hpp b/include/boost/http_proto/response_parser.hpp index 09398984..ebd6d8dd 100644 --- a/include/boost/http_proto/response_parser.hpp +++ b/include/boost/http_proto/response_parser.hpp @@ -20,8 +20,7 @@ namespace boost { namespace http_proto { -class BOOST_SYMBOL_VISIBLE - response_parser +class response_parser : public parser { public: diff --git a/include/boost/http_proto/response_view.hpp b/include/boost/http_proto/response_view.hpp index 66d2f27f..f57a95bd 100644 --- a/include/boost/http_proto/response_view.hpp +++ b/include/boost/http_proto/response_view.hpp @@ -19,8 +19,7 @@ namespace http_proto { /** A reference to an HTTP response header */ -class BOOST_SYMBOL_VISIBLE - response_view +class response_view : public message_view_base { friend class response_base; diff --git a/include/boost/http_proto/serializer.hpp b/include/boost/http_proto/serializer.hpp index e0b7a76b..49a6c480 100644 --- a/include/boost/http_proto/serializer.hpp +++ b/include/boost/http_proto/serializer.hpp @@ -65,8 +65,7 @@ class filter; called, or the serializer is destroyed, otherwise the behavior is undefined. */ -class BOOST_SYMBOL_VISIBLE - serializer +class serializer { public: using const_buffers_type = buffers::const_buffer_span; diff --git a/include/boost/http_proto/service/service.hpp b/include/boost/http_proto/service/service.hpp index 438a703b..d1462d2e 100644 --- a/include/boost/http_proto/service/service.hpp +++ b/include/boost/http_proto/service/service.hpp @@ -21,9 +21,10 @@ class services; /** Base class for all context services */ -struct BOOST_HTTP_PROTO_DECL +struct BOOST_SYMBOL_VISIBLE service { + BOOST_HTTP_PROTO_DECL virtual ~service() = 0; diff --git a/include/boost/http_proto/service/zlib_service.hpp b/include/boost/http_proto/service/zlib_service.hpp index 4eaddca0..403abf9c 100644 --- a/include/boost/http_proto/service/zlib_service.hpp +++ b/include/boost/http_proto/service/zlib_service.hpp @@ -117,7 +117,7 @@ struct stream /** Provides in-memory compression and decompression functions using zlib underneath. */ -struct BOOST_HTTP_PROTO_DECL +struct BOOST_SYMBOL_VISIBLE service : http_proto::service { diff --git a/include/boost/http_proto/sink.hpp b/include/boost/http_proto/sink.hpp index 769ccb14..faa21d25 100644 --- a/include/boost/http_proto/sink.hpp +++ b/include/boost/http_proto/sink.hpp @@ -31,7 +31,7 @@ namespace http_proto { Non-const member functions may not be called concurrently on the same instance. */ -struct BOOST_HTTP_PROTO_DECL +struct BOOST_SYMBOL_VISIBLE sink { /** The results of consuming data. @@ -162,6 +162,7 @@ struct BOOST_HTTP_PROTO_DECL @param more `true` if there will be one or more subsequent calls to @ref write. */ + BOOST_HTTP_PROTO_DECL virtual results on_write( diff --git a/include/boost/http_proto/source.hpp b/include/boost/http_proto/source.hpp index 90c8e111..312cd2c9 100644 --- a/include/boost/http_proto/source.hpp +++ b/include/boost/http_proto/source.hpp @@ -31,7 +31,7 @@ namespace http_proto { Non-const member functions may not be called concurrently on the same instance. */ -struct BOOST_HTTP_PROTO_DECL +struct BOOST_SYMBOL_VISIBLE source { /** The results of producing data. @@ -153,6 +153,7 @@ struct BOOST_HTTP_PROTO_DECL indicate failure or that no more data remains (or both). */ + BOOST_HTTP_PROTO_DECL virtual results on_read( diff --git a/test/unit/request_parser.cpp b/test/unit/request_parser.cpp index 3706738c..a43be461 100644 --- a/test/unit/request_parser.cpp +++ b/test/unit/request_parser.cpp @@ -133,7 +133,7 @@ struct request_parser_test BOOST_TEST(req.method() == m); BOOST_TEST(req.method_text() == to_string(m)); - BOOST_TEST(req.target_text() == t); + BOOST_TEST(req.target() == t); BOOST_TEST(req.version() == v); }; @@ -319,7 +319,7 @@ struct request_parser_test rv.method() == method::get); BOOST_TEST( rv.method_text() == "GET"); - BOOST_TEST(rv.target_text() == "/"); + BOOST_TEST(rv.target() == "/"); BOOST_TEST(rv.version() == version::http_1_1);