diff --git a/.evergreen/compile.sh b/.evergreen/compile.sh index 4bb1239975..b692969cff 100755 --- a/.evergreen/compile.sh +++ b/.evergreen/compile.sh @@ -15,6 +15,7 @@ set -o pipefail : "${build_type:?}" : "${distro_id:?}" # Required by find-cmake-latest.sh. +: "${BSONCXX_POLYFILL:-}" : "${COMPILE_MACRO_GUARD_TESTS:-}" : "${ENABLE_CODE_COVERAGE:-}" : "${ENABLE_TESTS:-}" @@ -22,7 +23,6 @@ set -o pipefail : "${platform:-}" : "${REQUIRED_CXX_STANDARD:-}" : "${RUN_DISTCHECK:-}" -: "${USE_POLYFILL_BOOST:-}" : "${USE_SANITIZER_ASAN:-}" : "${USE_SANITIZER_UBSAN:-}" : "${USE_STATIC_LIBS:-}" @@ -130,9 +130,13 @@ esac export CMAKE_GENERATOR="${generator:?}" export CMAKE_GENERATOR_PLATFORM="${platform:-}" -if [[ "${USE_POLYFILL_BOOST:-}" == "ON" ]]; then - cmake_flags+=("-DBSONCXX_POLY_USE_BOOST=ON") -fi +case "${BSONCXX_POLYFILL:-}" in +mnmlstc) cmake_flags+=(-D "BSONCXX_POLY_USE_MNMLSTC=ON") ;; +boost) cmake_flags+=(-D "BSONCXX_POLY_USE_BOOST=ON") ;; +impls) cmake_flags+=(-D "BSONCXX_POLY_USE_IMPLS=ON") ;; +std) cmake_flags+=(-D "BSONCXX_POLY_USE_STD=ON") ;; +*) ;; +esac cc_flags_init=(-Wall -Wextra -Wno-attributes -Werror -Wno-missing-field-initializers) cxx_flags_init=(-Wall -Wextra -Wconversion -Wnarrowing -pedantic -Werror) diff --git a/.mci.yml b/.mci.yml index aba3a0285f..44b0dbd00a 100644 --- a/.mci.yml +++ b/.mci.yml @@ -462,6 +462,7 @@ functions: include_expansions_in_env: - branch_name - build_type + - BSONCXX_POLYFILL - COMPILE_MACRO_GUARD_TESTS - distro_id - ENABLE_CODE_COVERAGE @@ -470,7 +471,6 @@ functions: - platform - REQUIRED_CXX_STANDARD - RUN_DISTCHECK - - USE_POLYFILL_BOOST - USE_SANITIZER_ASAN - USE_SANITIZER_UBSAN - USE_STATIC_LIBS @@ -2029,7 +2029,7 @@ buildvariants: cc_compiler: gcc cxx_compiler: g++ run_on: - - ubuntu2004-small + - ubuntu2004-large tasks: - name: compile_without_tests - name: compile_macro_guard_tests @@ -2042,7 +2042,7 @@ buildvariants: cc_compiler: clang cxx_compiler: clang++ run_on: - - ubuntu2004-small + - ubuntu2004-large tasks: - name: clang-tidy - name: compile_without_tests @@ -2066,7 +2066,7 @@ buildvariants: cmake: "cmake" lib_dir: "lib64" run_on: - - rhel83-zseries-small + - rhel83-zseries-large tasks: - name: compile_with_shared_libs - name: compile_and_test_with_shared_libs @@ -2084,7 +2084,7 @@ buildvariants: cmake: "cmake" lib_dir: "lib64" run_on: - - rhel83-zseries-small + - rhel83-zseries-large tasks: - name: compile_with_shared_libs - name: compile_and_test_with_shared_libs @@ -2102,7 +2102,7 @@ buildvariants: cmake: "cmake" lib_dir: "lib64" run_on: - - rhel83-zseries-small + - rhel83-zseries-large tasks: - name: compile_with_shared_libs - name: compile_and_test_with_shared_libs @@ -2181,7 +2181,7 @@ buildvariants: display_name: "MacOS 11.0 Release (Boost) (MongoDB Latest)" expansions: build_type: "Release" - USE_POLYFILL_BOOST: ON + BSONCXX_POLYFILL: "boost" mongodb_version: "latest" run_on: - macos-1100 @@ -2195,7 +2195,7 @@ buildvariants: display_name: "MacOS 11.0 Release (Boost) (MongoDB 5.0)" expansions: build_type: "Release" - USE_POLYFILL_BOOST: ON + BSONCXX_POLYFILL: "boost" mongodb_version: "5.0" run_on: - macos-1100 @@ -2209,7 +2209,7 @@ buildvariants: display_name: "MacOS 11.0 Release Versioned API" expansions: build_type: "Release" - USE_POLYFILL_BOOST: ON + BSONCXX_POLYFILL: "boost" mongodb_version: "latest" run_on: - macos-1100 @@ -2283,6 +2283,6 @@ buildvariants: build_type: "Release" BSONCXX_POLYFILL: impls run_on: - - rhel79-small + - rhel79-large tasks: - name: compile_without_tests diff --git a/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/stdx/optional.hpp b/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/stdx/optional.hpp index 9b61e61a8f..9692131ea8 100644 --- a/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/stdx/optional.hpp +++ b/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/stdx/optional.hpp @@ -506,7 +506,7 @@ struct optional_assign_base : optional_construct_base { // Allow move-assignment. - bsoncxx_cxx14_constexpr optional_assign_base& operator=(optional_assign_base&& other) = default; + bsoncxx_cxx14_constexpr optional_assign_base& operator=(optional_assign_base&&) = default; }; template @@ -529,7 +529,7 @@ struct optional_construct_base : optional_destruct_base { optional_construct_base() = default; optional_construct_base(const optional_construct_base&) = delete; - optional_construct_base(optional_construct_base&& other) = default; + optional_construct_base(optional_construct_base&&) = default; optional_construct_base& operator=(const optional_construct_base&) = default; optional_construct_base& operator=(optional_construct_base&&) = default; };