diff --git a/.clang-format b/.clang-format index f6721e7926..302198f61c 100644 --- a/.clang-format +++ b/.clang-format @@ -156,14 +156,18 @@ IncludeCategories: Priority: 24 - Regex: 'mongocxx/v1/.*\.hpp' # v1 public headers Priority: 25 - - Regex: 'bsoncxx/v1/.*\.hh' # v1 private headers + - Regex: 'bsoncxx/v1/.*\.hh' # v1 internal headers Priority: 26 - - Regex: 'mongocxx/v1/.*\.hh' # v1 private headers + - Regex: 'mongocxx/v1/.*\.hh' # v1 internal headers Priority: 27 - - Regex: 'bsoncxx/config(/private)?/prelude\.(hpp|hh)' # v_noabi preludes + - Regex: 'bsoncxx/private/.*' # private headers Priority: 60 - - Regex: 'mongocxx/config(/private)?/prelude\.(hpp|hh)' # v_noabi preludes + - Regex: 'mongocxx/private/.*' # private headers Priority: 61 + - Regex: 'bsoncxx/config/prelude\.(hpp|hh)' # v_noabi preludes + Priority: 62 + - Regex: 'mongocxx/config/prelude\.(hpp|hh)' # v_noabi preludes + Priority: 63 - Regex: 'bsoncxx/test/.*' # test headers Priority: 70 - Regex: 'mongocxx/test/.*' # test headers @@ -174,10 +178,14 @@ IncludeCategories: Priority: 40 - Regex: 'mongocxx/.*(-|\/)fwd\.(hpp|hh)' # all remaining forward headers Priority: 41 - - Regex: 'bsoncxx/.*' # all remaining headers + - Regex: 'bsoncxx/.*\.hpp' # all remaining public headers Priority: 50 - - Regex: 'mongocxx/.*' # all remaining headers + - Regex: 'mongocxx/.*\.hpp' # all remaining public headers Priority: 51 + - Regex: 'bsoncxx/.*\.hh' # all remaining internal headers + Priority: 52 + - Regex: 'mongocxx/.*\.hh' # all remaining internal headers + Priority: 53 - Regex: '.*' # all other headers (third party) Priority: 90 IncludeIsMainRegex: '([-_](test|unittest))?$' diff --git a/src/bsoncxx/lib/CMakeLists.txt b/src/bsoncxx/lib/CMakeLists.txt index 4103e8c825..02a5c2f8c2 100644 --- a/src/bsoncxx/lib/CMakeLists.txt +++ b/src/bsoncxx/lib/CMakeLists.txt @@ -12,6 +12,10 @@ # See the License for the specific language governing permissions and # limitations under the License. +set(bsoncxx_sources_private + bsoncxx/private/itoa.cpp +) + set(bsoncxx_sources_v_noabi bsoncxx/v_noabi/bsoncxx/array/element.cpp bsoncxx/v_noabi/bsoncxx/array/value.cpp @@ -28,7 +32,6 @@ set(bsoncxx_sources_v_noabi bsoncxx/v_noabi/bsoncxx/exception/exception.cpp bsoncxx/v_noabi/bsoncxx/json.cpp bsoncxx/v_noabi/bsoncxx/oid.cpp - bsoncxx/v_noabi/bsoncxx/private/itoa.cpp bsoncxx/v_noabi/bsoncxx/string/view_or_value.cpp bsoncxx/v_noabi/bsoncxx/types.cpp bsoncxx/v_noabi/bsoncxx/types/bson_value/value.cpp @@ -45,6 +48,7 @@ set(bsoncxx_sources_v1 ) list(APPEND bsoncxx_sources + ${bsoncxx_sources_private} ${bsoncxx_sources_v_noabi} ${bsoncxx_sources_v1} ) @@ -52,12 +56,10 @@ list(TRANSFORM bsoncxx_sources PREPEND "${CMAKE_CURRENT_SOURCE_DIR}/") set(bsoncxx_sources "${bsoncxx_sources}" PARENT_SCOPE) # Generate private headers. -if(1) - configure_file( - bsoncxx/v_noabi/bsoncxx/config/private/config.hh.in - bsoncxx/v_noabi/bsoncxx/config/private/config.hh - ) -endif() +configure_file( + bsoncxx/private/config/config.hh.in + bsoncxx/private/config/config.hh +) # Generate and install public headers. if(1) @@ -81,21 +83,20 @@ endif() set_dist_list(src_bsoncxx_lib_DIST CMakeLists.txt + ${bsoncxx_sources_private} ${bsoncxx_sources_v_noabi} ${bsoncxx_sources_v1} - bsoncxx/v_noabi/bsoncxx/config/private/config.hh.in - bsoncxx/v_noabi/bsoncxx/config/private/postlude.hh - bsoncxx/v_noabi/bsoncxx/config/private/prelude.hh - bsoncxx/v_noabi/bsoncxx/private/b64_ntop.hh - bsoncxx/v_noabi/bsoncxx/private/helpers.hh - bsoncxx/v_noabi/bsoncxx/private/make_unique.hh - bsoncxx/v_noabi/bsoncxx/private/itoa.hh - bsoncxx/v_noabi/bsoncxx/private/libbson.hh - bsoncxx/v_noabi/bsoncxx/private/stack.hh - bsoncxx/v_noabi/bsoncxx/private/suppress_deprecation_warnings.hh - bsoncxx/v_noabi/bsoncxx/test_util/export_for_testing.hh - bsoncxx/v_noabi/bsoncxx/types/bson_value/private/value.hh - bsoncxx/v_noabi/bsoncxx/types/private/convert.hh + bsoncxx/private/b64_ntop.hh + bsoncxx/private/config/config.hh.in + bsoncxx/private/convert.hh + bsoncxx/private/export.hh + bsoncxx/private/helpers.hh + bsoncxx/private/itoa.hh + bsoncxx/private/bson.hh + bsoncxx/private/make_unique.hh + bsoncxx/private/stack.hh + bsoncxx/private/suppress_deprecation_warnings.hh + bsoncxx/v_noabi/bsoncxx/types/bson_value/value.hh bsoncxx/v1/config/config.hpp.in bsoncxx/v1/config/version.hpp.in ) diff --git a/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/private/b64_ntop.hh b/src/bsoncxx/lib/bsoncxx/private/b64_ntop.hh similarity index 99% rename from src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/private/b64_ntop.hh rename to src/bsoncxx/lib/bsoncxx/private/b64_ntop.hh index e902e23e19..a3a8e6ec3c 100644 --- a/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/private/b64_ntop.hh +++ b/src/bsoncxx/lib/bsoncxx/private/b64_ntop.hh @@ -45,8 +45,6 @@ #include #include -#include - namespace bsoncxx { namespace b64 { @@ -187,5 +185,3 @@ inline int ntop(std::uint8_t const* src, std::size_t srclength, char* target, st } // namespace b64 } // namespace bsoncxx - -#include diff --git a/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/config/private/prelude.hh b/src/bsoncxx/lib/bsoncxx/private/bson.hh similarity index 69% rename from src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/config/private/prelude.hh rename to src/bsoncxx/lib/bsoncxx/private/bson.hh index 2121524065..8bda5471a4 100644 --- a/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/config/private/prelude.hh +++ b/src/bsoncxx/lib/bsoncxx/private/bson.hh @@ -12,9 +12,15 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include +#pragma once -// NOTE: Push any macros here that are defined by the following -// headers here. +#include -#include +BSONCXX_PRIVATE_WARNINGS_PUSH(); + +BSONCXX_PRIVATE_WARNINGS_DISABLE(GNU("-Wconversion")); +BSONCXX_PRIVATE_IF_MSVC(BSONCXX_PRIVATE_PRAGMA(warning(push, 1));) + +#include + +BSONCXX_PRIVATE_WARNINGS_POP(); diff --git a/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/config/private/config.hh.in b/src/bsoncxx/lib/bsoncxx/private/config/config.hh.in similarity index 100% rename from src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/config/private/config.hh.in rename to src/bsoncxx/lib/bsoncxx/private/config/config.hh.in diff --git a/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/types/private/convert.hh b/src/bsoncxx/lib/bsoncxx/private/convert.hh similarity index 98% rename from src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/types/private/convert.hh rename to src/bsoncxx/lib/bsoncxx/private/convert.hh index 8d8b38a96a..543fc30b69 100644 --- a/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/types/private/convert.hh +++ b/src/bsoncxx/lib/bsoncxx/private/convert.hh @@ -14,14 +14,15 @@ #pragma once +#include + #include -#include -#include #include #include -#include +#include +#include namespace bsoncxx { namespace v_noabi { @@ -326,5 +327,3 @@ inline void convert_from_libbson(bson_value_t const* v, b_array* out) { } // namespace types } // namespace v_noabi } // namespace bsoncxx - -#include diff --git a/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/test_util/export_for_testing.hh b/src/bsoncxx/lib/bsoncxx/private/export.hh similarity index 92% rename from src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/test_util/export_for_testing.hh rename to src/bsoncxx/lib/bsoncxx/private/export.hh index daeda50ae9..26c729ee78 100644 --- a/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/test_util/export_for_testing.hh +++ b/src/bsoncxx/lib/bsoncxx/private/export.hh @@ -14,7 +14,7 @@ #pragma once -#include +#include // The BSONCXX_TESTING macro is intended to be used for exporting symbols for testing which are not // normally exported as part of the bsoncxx library. We currently use this workaround in lieu of @@ -28,5 +28,3 @@ #define BSONCXX_ABI_EXPORT_TESTING #define BSONCXX_ABI_EXPORT_CDECL_TESTING(...) __VA_ARGS__ #endif - -#include diff --git a/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/private/helpers.hh b/src/bsoncxx/lib/bsoncxx/private/helpers.hh similarity index 92% rename from src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/private/helpers.hh rename to src/bsoncxx/lib/bsoncxx/private/helpers.hh index 32d887d303..4c1d889aec 100644 --- a/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/private/helpers.hh +++ b/src/bsoncxx/lib/bsoncxx/private/helpers.hh @@ -17,9 +17,8 @@ #include #include #include -#include -#include +#include namespace bsoncxx { namespace helpers { @@ -47,5 +46,3 @@ inline bsoncxx::v_noabi::oid make_oid(bson_oid_t const* bson_oid) { } // namespace helpers } // namespace bsoncxx - -#include diff --git a/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/private/itoa.cpp b/src/bsoncxx/lib/bsoncxx/private/itoa.cpp similarity index 95% rename from src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/private/itoa.cpp rename to src/bsoncxx/lib/bsoncxx/private/itoa.cpp index 962118bfe8..fa6bc04d11 100644 --- a/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/private/itoa.cpp +++ b/src/bsoncxx/lib/bsoncxx/private/itoa.cpp @@ -14,13 +14,11 @@ #include -#include - namespace bsoncxx { namespace { -constexpr char kIndexTable[] = +constexpr char k_index_table[] = "0\0" "1\0" "2\0" @@ -1021,38 +1019,39 @@ constexpr char kIndexTable[] = "997\0" "998\0" "999\0"; + } // namespace -itoa::itoa(uint32_t val) : _val(val) { +itoa::itoa(std::uint32_t val) : _val(val) { _init(); } -itoa& itoa::operator=(uint32_t new_val) { +itoa& itoa::operator=(std::uint32_t new_val) { _val = new_val; _init(); return *this; } void itoa::_init() { - if (_val < 10) { - _str = kIndexTable + (2 * _val); - _len = 1; - } else if (_val < 100) { - _str = kIndexTable + (2 * 10) + (3 * (_val - 10)); - _len = 2; - } else if (_val < 1000) { - _str = kIndexTable + (2 * 10) + (3 * 90) + (4 * (_val - 100)); - _len = 3; + if (_val < 10u) { + _str = k_index_table + (2u * _val); + _len = 1u; + } else if (_val < 100u) { + _str = k_index_table + (2u * 10u) + (3u * (_val - 10u)); + _len = 2u; + } else if (_val < 1000u) { + _str = k_index_table + (2u * 10u) + (3u * 90u) + (4 * (_val - 100u)); + _len = 3u; } else { - int size = static_cast(sizeof(_buf) - 1); + int size = static_cast(sizeof(_buf) - 1u); int i = size; _buf[i] = '\0'; - while (_val > 0) { + while (_val > 0u) { i--; - _buf[i] = static_cast((_val % 10) + '0'); - _val = _val / 10; + _buf[i] = static_cast((_val % 10u) + '0'); + _val = _val / 10u; } _str = _buf + i; diff --git a/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/private/itoa.hh b/src/bsoncxx/lib/bsoncxx/private/itoa.hh similarity index 75% rename from src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/private/itoa.hh rename to src/bsoncxx/lib/bsoncxx/private/itoa.hh index af23dea484..1a6ceeeb65 100644 --- a/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/private/itoa.hh +++ b/src/bsoncxx/lib/bsoncxx/private/itoa.hh @@ -17,27 +17,31 @@ #include #include -#include - -#include +#include namespace bsoncxx { class itoa { - public: - explicit BSONCXX_ABI_EXPORT_CDECL_TESTING() itoa(uint32_t i = 0); + private: + std::uint32_t _val; + char const* _str; + std::uint8_t _len; + char _buf[11]; + public: ~itoa() = default; - itoa(itoa&& rhs) = delete; itoa& operator=(itoa&&) = delete; - itoa(itoa const& rhs) = delete; itoa& operator=(itoa const&) = delete; - BSONCXX_ABI_EXPORT_CDECL_TESTING(itoa&) operator=(uint32_t new_value); + itoa() : itoa(0u) {} + + explicit BSONCXX_ABI_EXPORT_CDECL_TESTING() itoa(std::uint32_t i); - uint32_t val() const { + itoa& operator=(std::uint32_t new_value); + + std::uint32_t val() const { return _val; } @@ -51,13 +55,6 @@ class itoa { private: void _init(); - - uint32_t _val; - char const* _str; - uint8_t _len; - char _buf[11]; }; } // namespace bsoncxx - -#include diff --git a/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/private/make_unique.hh b/src/bsoncxx/lib/bsoncxx/private/make_unique.hh similarity index 98% rename from src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/private/make_unique.hh rename to src/bsoncxx/lib/bsoncxx/private/make_unique.hh index e3b6927e1a..c9f66ecbf3 100644 --- a/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/private/make_unique.hh +++ b/src/bsoncxx/lib/bsoncxx/private/make_unique.hh @@ -14,9 +14,9 @@ #pragma once -#include +#include -#include +#include #pragma push_macro("BSONCXX_DETAIL_USE_STD_MAKE_UNIQUE") #undef BSONCXX_DETAIL_USE_STD_MAKE_UNIQUE @@ -168,5 +168,3 @@ std::unique_ptr make_unique_for_overwrite(std::size_t count) { } // namespace bsoncxx #pragma pop_macro("BSONCXX_DETAIL_USE_STD_MAKE_UNIQUE") - -#include diff --git a/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/private/stack.hh b/src/bsoncxx/lib/bsoncxx/private/stack.hh similarity index 97% rename from src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/private/stack.hh rename to src/bsoncxx/lib/bsoncxx/private/stack.hh index 173edaf6d2..e1f8c2f7b0 100644 --- a/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/private/stack.hh +++ b/src/bsoncxx/lib/bsoncxx/private/stack.hh @@ -18,8 +18,6 @@ #include #include -#include - namespace bsoncxx { // Note: This stack is only intended for use with the 'frame' type in @@ -161,5 +159,3 @@ class stack { }; } // namespace bsoncxx - -#include diff --git a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/config/private/postlude.hh b/src/bsoncxx/lib/bsoncxx/private/suppress_deprecation_warnings.hh similarity index 59% rename from src/mongocxx/lib/mongocxx/v_noabi/mongocxx/config/private/postlude.hh rename to src/bsoncxx/lib/bsoncxx/private/suppress_deprecation_warnings.hh index 060636a649..9aff17b04e 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/config/private/postlude.hh +++ b/src/bsoncxx/lib/bsoncxx/private/suppress_deprecation_warnings.hh @@ -12,15 +12,13 @@ // See the License for the specific language governing permissions and // limitations under the License. -// NOTE: Pop any macros here that are defined by the headers included -// in private/prelude.hpp. +#pragma once -// config.hh (generated by CMake) -#undef MONGOCXX_ENABLE_SSL -#pragma pop_macro("MONGOCXX_ENABLE_SSL") -#undef MONGOCXX_COMPILER_ID -#pragma pop_macro("MONGOCXX_COMPILER_ID") -#undef MONGOCXX_COMPILER_VERSION -#pragma pop_macro("MONGOCXX_COMPILER_VERSION") +#include -#include +#define BSONCXX_SUPPRESS_DEPRECATION_WARNINGS_BEGIN \ + BSONCXX_PRIVATE_WARNINGS_PUSH(); \ + BSONCXX_PRIVATE_WARNINGS_DISABLE(GNU("-Wdeprecated-declarations")); \ + BSONCXX_PRIVATE_WARNINGS_DISABLE(MSVC(4996)); + +#define BSONCXX_SUPPRESS_DEPRECATION_WARNINGS_END BSONCXX_PRIVATE_WARNINGS_POP(); diff --git a/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/array/element.cpp b/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/array/element.cpp index 84e200c8b9..058c9dbd65 100644 --- a/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/array/element.cpp +++ b/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/array/element.cpp @@ -17,8 +17,6 @@ #include #include -#include - namespace bsoncxx { namespace v_noabi { namespace array { diff --git a/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/array/value.cpp b/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/array/value.cpp index 59a1fd65f1..20e1202e2a 100644 --- a/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/array/value.cpp +++ b/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/array/value.cpp @@ -16,8 +16,6 @@ #include -#include - namespace bsoncxx { namespace v_noabi { namespace array { diff --git a/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/array/view.cpp b/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/array/view.cpp index fc31a76c7e..4e256d9e1f 100644 --- a/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/array/view.cpp +++ b/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/array/view.cpp @@ -16,12 +16,11 @@ #include #include -#include -#include #include #include -#include +#include +#include namespace bsoncxx { namespace v_noabi { diff --git a/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/builder/core.cpp b/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/builder/core.cpp index 7cc4931c59..ccafacd58e 100644 --- a/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/builder/core.cpp +++ b/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/builder/core.cpp @@ -17,17 +17,16 @@ #include #include #include -#include -#include -#include -#include -#include #include #include #include #include -#include +#include +#include +#include +#include +#include namespace bsoncxx { namespace v_noabi { diff --git a/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/config/private/postlude.hh b/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/config/private/postlude.hh deleted file mode 100644 index 0dfcfee59c..0000000000 --- a/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/config/private/postlude.hh +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright 2009-present MongoDB, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// NOTE: Pop any macros here that are defined by the headers included -// in private/prelude.hpp. - -#include diff --git a/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/decimal128.cpp b/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/decimal128.cpp index a710ccc280..b9e4552d45 100644 --- a/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/decimal128.cpp +++ b/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/decimal128.cpp @@ -15,11 +15,10 @@ #include #include #include -#include #include #include -#include +#include namespace bsoncxx { namespace v_noabi { diff --git a/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/document/element.cpp b/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/document/element.cpp index bc497e2919..a94861f3fc 100644 --- a/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/document/element.cpp +++ b/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/document/element.cpp @@ -12,19 +12,23 @@ // See the License for the specific language governing permissions and // limitations under the License. +#include + +// + +#include + #include #include -#include #include #include -#include -#include #include #include #include -#include +#include +#include #define BSONCXX_CITER \ bson_iter_t iter; \ diff --git a/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/document/value.cpp b/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/document/value.cpp index b5b636b8c5..0a48995727 100644 --- a/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/document/value.cpp +++ b/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/document/value.cpp @@ -16,8 +16,6 @@ #include -#include - namespace bsoncxx { namespace v_noabi { namespace document { diff --git a/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/document/view.cpp b/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/document/view.cpp index 8ae1b190a2..4109c86f56 100644 --- a/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/document/view.cpp +++ b/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/document/view.cpp @@ -16,10 +16,9 @@ #include #include -#include #include -#include +#include namespace bsoncxx { namespace v_noabi { diff --git a/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/exception/error_code.cpp b/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/exception/error_code.cpp index 62943a0a9e..35f497cb3b 100644 --- a/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/exception/error_code.cpp +++ b/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/exception/error_code.cpp @@ -16,8 +16,6 @@ #include -#include - namespace bsoncxx { namespace v_noabi { diff --git a/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/json.cpp b/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/json.cpp index 8393de1bac..a8424a2cea 100644 --- a/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/json.cpp +++ b/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/json.cpp @@ -12,6 +12,12 @@ // See the License for the specific language governing permissions and // limitations under the License. +#include + +// + +#include + #include #include @@ -19,13 +25,12 @@ #include #include #include -#include -#include #include #include #include -#include +#include +#include namespace bsoncxx { namespace v_noabi { diff --git a/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/oid.cpp b/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/oid.cpp index cf14c3ee2c..d48a8b9541 100644 --- a/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/oid.cpp +++ b/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/oid.cpp @@ -17,9 +17,8 @@ #include #include #include -#include -#include +#include namespace bsoncxx { namespace v_noabi { diff --git a/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/private/libbson.hh b/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/private/libbson.hh deleted file mode 100644 index f35a62275b..0000000000 --- a/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/private/libbson.hh +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2009-present MongoDB, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#pragma once - -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wconversion" -#elif defined(__GNUC__) -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wconversion" -#elif (_MSC_VER) -// TODO: CXX-1366 Disable MSVC warnings for libbson -#endif - -#include - -#if defined(__clang__) -#pragma clang diagnostic pop -#elif defined(__GNUC__) -#pragma GCC diagnostic pop -#elif (_MSC_VER) -// TODO: CXX-1366 Disable MSVC warnings for libbson -#endif diff --git a/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/private/suppress_deprecation_warnings.hh b/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/private/suppress_deprecation_warnings.hh deleted file mode 100644 index 915afa6aa0..0000000000 --- a/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/private/suppress_deprecation_warnings.hh +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright 2009-present MongoDB, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#pragma once - -// The macros BSONCXX_SUPPRESS_DEPRECATION_WARNINGS_BEGIN and -// BSONCXX_SUPPRESS_DEPRECATION_WARNINGS_END are intended for the use of disabling deprecation -// warnings for a given section of code. -// -// Example usage: -// -// { -// some_function(); -// BSONCXX_SUPPRESS_DEPRECATION_WARNINGS_BEGIN; -// some_deprecated_function(); -// BSONCXX_SUPPRESS_DEPRECATION_WARNINGS_END; -// some_other_function(); -// } - -#ifdef __clang__ -#define BSONCXX_SUPPRESS_DEPRECATION_WARNINGS_BEGIN \ - _Pragma("clang diagnostic push") _Pragma("clang diagnostic ignored \"-Wdeprecated-declarations\"") -#elif defined __GNUC__ -#define BSONCXX_SUPPRESS_DEPRECATION_WARNINGS_BEGIN \ - _Pragma("GCC diagnostic push") _Pragma("GCC diagnostic ignored \"-Wdeprecated-declarations\"") -#elif defined _MSC_VER -#define BSONCXX_SUPPRESS_DEPRECATION_WARNINGS_BEGIN __pragma(warning(push)) __pragma(warning(disable : 4996)) -#endif - -#ifdef __clang__ -#define BSONCXX_SUPPRESS_DEPRECATION_WARNINGS_END _Pragma("clang diagnostic pop") -#elif defined __GNUC__ -#define BSONCXX_SUPPRESS_DEPRECATION_WARNINGS_END _Pragma("GCC diagnostic pop") -#elif defined _MSC_VER -#define BSONCXX_SUPPRESS_DEPRECATION_WARNINGS_END __pragma(warning(pop)) -#endif diff --git a/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/string/view_or_value.cpp b/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/string/view_or_value.cpp index d01972dafa..60f1e4534a 100644 --- a/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/string/view_or_value.cpp +++ b/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/string/view_or_value.cpp @@ -15,8 +15,6 @@ #include #include -#include - namespace bsoncxx { namespace v_noabi { namespace string { diff --git a/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/types.cpp b/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/types.cpp index 76e8ae0348..9b06353a48 100644 --- a/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/types.cpp +++ b/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/types.cpp @@ -14,8 +14,6 @@ #include -#include - namespace bsoncxx { namespace v_noabi { diff --git a/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/types/bson_value/value.cpp b/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/types/bson_value/value.cpp index c673065068..2f4b67a4c8 100644 --- a/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/types/bson_value/value.cpp +++ b/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/types/bson_value/value.cpp @@ -12,14 +12,15 @@ // See the License for the specific language governing permissions and // limitations under the License. +#include + +// + #include #include -#include -#include -#include -#include -#include +#include +#include namespace bsoncxx { namespace v_noabi { diff --git a/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/types/bson_value/private/value.hh b/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/types/bson_value/value.hh similarity index 93% rename from src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/types/bson_value/private/value.hh rename to src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/types/bson_value/value.hh index 0c7d34d6ab..b9af7b4fda 100644 --- a/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/types/bson_value/private/value.hh +++ b/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/types/bson_value/value.hh @@ -14,11 +14,13 @@ #pragma once -#include #include + +// + #include -#include +#include namespace bsoncxx { namespace v_noabi { @@ -64,5 +66,3 @@ inline bson_value::value make_owning_bson(void* internal_value) { } // namespace types } // namespace v_noabi } // namespace bsoncxx - -#include diff --git a/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/types/bson_value/view.cpp b/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/types/bson_value/view.cpp index 27ae875239..55793ee25c 100644 --- a/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/types/bson_value/view.cpp +++ b/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/types/bson_value/view.cpp @@ -16,12 +16,11 @@ #include #include -#include -#include #include -#include -#include +#include +#include +#include #define BSONCXX_CITER \ bson_iter_t iter; \ diff --git a/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/validate.cpp b/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/validate.cpp index 51a38f768d..7bb79809e9 100644 --- a/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/validate.cpp +++ b/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/validate.cpp @@ -12,11 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include -#include #include -#include +#include +#include namespace bsoncxx { namespace v_noabi { diff --git a/src/bsoncxx/test/bson_builder.cpp b/src/bsoncxx/test/bson_builder.cpp index cd4188ac32..c882ee11b7 100644 --- a/src/bsoncxx/test/bson_builder.cpp +++ b/src/bsoncxx/test/bson_builder.cpp @@ -22,11 +22,12 @@ #include #include #include -#include #include #include #include +#include + #include #include diff --git a/src/bsoncxx/test/catch.cpp b/src/bsoncxx/test/catch.cpp index ac914c5fc9..bd77ed0783 100644 --- a/src/bsoncxx/test/catch.cpp +++ b/src/bsoncxx/test/catch.cpp @@ -16,9 +16,9 @@ // -#include +#include -#include +#include #include diff --git a/src/bsoncxx/test/catch.hh b/src/bsoncxx/test/catch.hh index aef7695024..fbc5b2761d 100644 --- a/src/bsoncxx/test/catch.hh +++ b/src/bsoncxx/test/catch.hh @@ -14,14 +14,14 @@ #pragma once +#include + #include #include #include #include #include -#include - #include #include // TEST_CASE, SECTION, CHECK, etc. @@ -148,5 +148,3 @@ struct StringMaker { }; } // namespace Catch - -#include diff --git a/src/bsoncxx/test/exception_guard.hh b/src/bsoncxx/test/exception_guard.hh index 3fdfa14f80..b090572419 100644 --- a/src/bsoncxx/test/exception_guard.hh +++ b/src/bsoncxx/test/exception_guard.hh @@ -23,8 +23,6 @@ #include -#include - #include namespace bsoncxx { @@ -101,5 +99,3 @@ struct exception_guard_state { } // namespace test } // namespace bsoncxx - -#include diff --git a/src/bsoncxx/test/json.cpp b/src/bsoncxx/test/json.cpp index e42b3e1762..150cbacdf1 100644 --- a/src/bsoncxx/test/json.cpp +++ b/src/bsoncxx/test/json.cpp @@ -18,7 +18,8 @@ #include #include #include -#include + +#include #include diff --git a/src/bsoncxx/test/oid.cpp b/src/bsoncxx/test/oid.cpp index 6ad9d79a62..f494214095 100644 --- a/src/bsoncxx/test/oid.cpp +++ b/src/bsoncxx/test/oid.cpp @@ -20,7 +20,8 @@ #include #include -#include + +#include #include diff --git a/src/bsoncxx/test/optional.test.cpp b/src/bsoncxx/test/optional.test.cpp index 627b316a25..70e0fddbdb 100644 --- a/src/bsoncxx/test/optional.test.cpp +++ b/src/bsoncxx/test/optional.test.cpp @@ -6,12 +6,11 @@ #include #include -#include #include #include #include -#include +#include #include diff --git a/src/bsoncxx/test/string_view.test.cpp b/src/bsoncxx/test/string_view.test.cpp index 69b87ad410..4b5aebaff4 100644 --- a/src/bsoncxx/test/string_view.test.cpp +++ b/src/bsoncxx/test/string_view.test.cpp @@ -18,8 +18,6 @@ #include #include -#include - #include namespace stdx = bsoncxx::stdx; diff --git a/src/bsoncxx/test/to_string.hh b/src/bsoncxx/test/to_string.hh index 18da14f8ff..0cdf5ccb20 100644 --- a/src/bsoncxx/test/to_string.hh +++ b/src/bsoncxx/test/to_string.hh @@ -26,8 +26,6 @@ #include #include -#include - namespace bsoncxx { inline std::string to_string(bsoncxx::v_noabi::types::bson_value::view_or_value val) { @@ -92,5 +90,3 @@ inline std::string to_string(bsoncxx::v_noabi::types::bson_value::view_or_value } } // namespace bsoncxx - -#include diff --git a/src/bsoncxx/test/type_traits.test.cpp b/src/bsoncxx/test/type_traits.test.cpp index dae83f62ec..7152aa5de8 100644 --- a/src/bsoncxx/test/type_traits.test.cpp +++ b/src/bsoncxx/test/type_traits.test.cpp @@ -3,8 +3,6 @@ #include -#include - #include // We declare variables that are only used for compilation checking diff --git a/src/mongocxx/lib/CMakeLists.txt b/src/mongocxx/lib/CMakeLists.txt index 0a4fb40d9e..5205f9fc4a 100644 --- a/src/mongocxx/lib/CMakeLists.txt +++ b/src/mongocxx/lib/CMakeLists.txt @@ -12,6 +12,13 @@ # See the License for the specific language governing permissions and # limitations under the License. +set(mongocxx_sources_private + mongocxx/private/bson.cpp + mongocxx/private/conversions.cpp + mongocxx/private/mongoc.cpp + mongocxx/private/numeric_casting.cpp +) + set(mongocxx_sources_v_noabi mongocxx/v_noabi/mongocxx/bulk_write.cpp mongocxx/v_noabi/mongocxx/change_stream.cpp @@ -96,10 +103,6 @@ set(mongocxx_sources_v_noabi mongocxx/v_noabi/mongocxx/options/update.cpp mongocxx/v_noabi/mongocxx/pipeline.cpp mongocxx/v_noabi/mongocxx/pool.cpp - mongocxx/v_noabi/mongocxx/private/conversions.cpp - mongocxx/v_noabi/mongocxx/private/libbson.cpp - mongocxx/v_noabi/mongocxx/private/libmongoc.cpp - mongocxx/v_noabi/mongocxx/private/numeric_casting.cpp mongocxx/v_noabi/mongocxx/read_concern.cpp mongocxx/v_noabi/mongocxx/read_preference.cpp mongocxx/v_noabi/mongocxx/result/bulk_write.cpp @@ -126,6 +129,7 @@ set(mongocxx_sources_v1 ) list(APPEND mongocxx_sources + ${mongocxx_sources_private} ${mongocxx_sources_v_noabi} ${mongocxx_sources_v1} ) @@ -147,8 +151,8 @@ if(1) endif() configure_file( - mongocxx/v_noabi/mongocxx/config/private/config.hh.in - mongocxx/v_noabi/mongocxx/config/private/config.hh + mongocxx/private/config/config.hh.in + mongocxx/private/config/config.hh ) endif() @@ -174,45 +178,43 @@ endif() set_dist_list(src_mongocxx_lib_DIST CMakeLists.txt + ${mongocxx_sources_private} ${mongocxx_sources_v_noabi} ${mongocxx_sources_v1} - mongocxx/v_noabi/mongocxx/config/private/config.hh.in - mongocxx/v_noabi/mongocxx/config/private/postlude.hh - mongocxx/v_noabi/mongocxx/config/private/prelude.hh - mongocxx/v_noabi/mongocxx/exception/private/mongoc_error.hh - mongocxx/v_noabi/mongocxx/gridfs/private/bucket.hh - mongocxx/v_noabi/mongocxx/gridfs/private/downloader.hh - mongocxx/v_noabi/mongocxx/gridfs/private/uploader.hh - mongocxx/v_noabi/mongocxx/options/private/apm.hh - mongocxx/v_noabi/mongocxx/options/private/server_api.hh - mongocxx/v_noabi/mongocxx/options/private/ssl.hh - mongocxx/v_noabi/mongocxx/options/private/transaction.hh - mongocxx/v_noabi/mongocxx/private/append_aggregate_options.hh - mongocxx/v_noabi/mongocxx/private/bulk_write.hh - mongocxx/v_noabi/mongocxx/private/change_stream.hh - mongocxx/v_noabi/mongocxx/private/client_encryption.hh - mongocxx/v_noabi/mongocxx/private/client_session.hh - mongocxx/v_noabi/mongocxx/private/client.hh - mongocxx/v_noabi/mongocxx/private/collection.hh - mongocxx/v_noabi/mongocxx/private/conversions.hh - mongocxx/v_noabi/mongocxx/private/cursor.hh - mongocxx/v_noabi/mongocxx/private/database.hh - mongocxx/v_noabi/mongocxx/private/index_view.hh - mongocxx/v_noabi/mongocxx/private/libbson.hh - mongocxx/v_noabi/mongocxx/private/libmongoc_symbols.hh - mongocxx/v_noabi/mongocxx/private/libmongoc.hh - mongocxx/v_noabi/mongocxx/private/numeric_casting.hh - mongocxx/v_noabi/mongocxx/private/pipeline.hh - mongocxx/v_noabi/mongocxx/private/pool.hh - mongocxx/v_noabi/mongocxx/private/read_concern.hh - mongocxx/v_noabi/mongocxx/private/read_preference.hh - mongocxx/v_noabi/mongocxx/private/scoped_bson_value.hh - mongocxx/v_noabi/mongocxx/private/search_index_model.hh - mongocxx/v_noabi/mongocxx/private/search_index_view.hh - mongocxx/v_noabi/mongocxx/private/uri.hh - mongocxx/v_noabi/mongocxx/private/write_concern.hh - mongocxx/v_noabi/mongocxx/test_util/export_for_testing.hh - mongocxx/v_noabi/mongocxx/test_util/mock.hh + mongocxx/private/append_aggregate_options.hh + mongocxx/private/bson.hh + mongocxx/private/bulk_write.hh + mongocxx/private/change_stream.hh + mongocxx/private/client_encryption.hh + mongocxx/private/client_session.hh + mongocxx/private/client.hh + mongocxx/private/collection.hh + mongocxx/private/config/config.hh.in + mongocxx/private/conversions.hh + mongocxx/private/cursor.hh + mongocxx/private/database.hh + mongocxx/private/export.hh + mongocxx/private/index_view.hh + mongocxx/private/mock.hh + mongocxx/private/mongoc_error.hh + mongocxx/private/mongoc.hh + mongocxx/private/numeric_casting.hh + mongocxx/private/pipeline.hh + mongocxx/private/pool.hh + mongocxx/private/read_concern.hh + mongocxx/private/read_preference.hh + mongocxx/private/scoped_bson_value.hh + mongocxx/private/search_index_model.hh + mongocxx/private/search_index_view.hh + mongocxx/private/uri.hh + mongocxx/private/write_concern.hh + mongocxx/v_noabi/mongocxx/gridfs/bucket.hh + mongocxx/v_noabi/mongocxx/gridfs/downloader.hh + mongocxx/v_noabi/mongocxx/gridfs/uploader.hh + mongocxx/v_noabi/mongocxx/options/apm.hh + mongocxx/v_noabi/mongocxx/options/server_api.hh + mongocxx/v_noabi/mongocxx/options/tls.hh + mongocxx/v_noabi/mongocxx/options/transaction.hh mongocxx/v1/config/config.hpp.in mongocxx/v1/config/version.hpp.in ) diff --git a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/append_aggregate_options.hh b/src/mongocxx/lib/mongocxx/private/append_aggregate_options.hh similarity index 94% rename from src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/append_aggregate_options.hh rename to src/mongocxx/lib/mongocxx/private/append_aggregate_options.hh index 406382909c..a8320e3d1a 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/append_aggregate_options.hh +++ b/src/mongocxx/lib/mongocxx/private/append_aggregate_options.hh @@ -4,8 +4,6 @@ #include -#include - namespace mongocxx { namespace v_noabi { @@ -56,5 +54,3 @@ inline void append_aggregate_options( } } // namespace v_noabi } // namespace mongocxx - -#include diff --git a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/libbson.cpp b/src/mongocxx/lib/mongocxx/private/bson.cpp similarity index 97% rename from src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/libbson.cpp rename to src/mongocxx/lib/mongocxx/private/bson.cpp index 2486223763..b7b8309248 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/libbson.cpp +++ b/src/mongocxx/lib/mongocxx/private/bson.cpp @@ -12,9 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include - -#include +#include namespace mongocxx { namespace libbson { diff --git a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/libbson.hh b/src/mongocxx/lib/mongocxx/private/bson.hh similarity index 97% rename from src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/libbson.hh rename to src/mongocxx/lib/mongocxx/private/bson.hh index 71ca614bf5..97782cc9a1 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/libbson.hh +++ b/src/mongocxx/lib/mongocxx/private/bson.hh @@ -17,12 +17,11 @@ #include #include #include -#include #include -#include +#include -#include +#include namespace mongocxx { namespace libbson { @@ -161,5 +160,3 @@ class scoped_bson_t { } // namespace libbson } // namespace mongocxx - -#include diff --git a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/bulk_write.hh b/src/mongocxx/lib/mongocxx/private/bulk_write.hh similarity index 89% rename from src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/bulk_write.hh rename to src/mongocxx/lib/mongocxx/private/bulk_write.hh index 0fce635f90..3054300ed3 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/bulk_write.hh +++ b/src/mongocxx/lib/mongocxx/private/bulk_write.hh @@ -15,9 +15,8 @@ #pragma once #include -#include -#include +#include namespace mongocxx { namespace v_noabi { @@ -42,5 +41,3 @@ class bulk_write::impl { } // namespace v_noabi } // namespace mongocxx - -#include diff --git a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/change_stream.hh b/src/mongocxx/lib/mongocxx/private/change_stream.hh similarity index 93% rename from src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/change_stream.hh rename to src/mongocxx/lib/mongocxx/private/change_stream.hh index 2e82dd9929..334e8d6107 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/change_stream.hh +++ b/src/mongocxx/lib/mongocxx/private/change_stream.hh @@ -18,12 +18,11 @@ #include #include -#include #include -#include -#include -#include +#include +#include +#include namespace mongocxx { namespace v_noabi { @@ -122,5 +121,3 @@ class change_stream::impl { } // namespace v_noabi } // namespace mongocxx - -#include diff --git a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/client.hh b/src/mongocxx/lib/mongocxx/private/client.hh similarity index 90% rename from src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/client.hh rename to src/mongocxx/lib/mongocxx/private/client.hh index 3f6c23e478..21367e08d5 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/client.hh +++ b/src/mongocxx/lib/mongocxx/private/client.hh @@ -17,10 +17,9 @@ #include #include -#include -#include -#include +#include +#include namespace mongocxx { namespace v_noabi { @@ -46,5 +45,3 @@ class client::impl { } // namespace v_noabi } // namespace mongocxx - -#include diff --git a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/client_encryption.hh b/src/mongocxx/lib/mongocxx/private/client_encryption.hh similarity index 96% rename from src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/client_encryption.hh rename to src/mongocxx/lib/mongocxx/private/client_encryption.hh index f1f50f22f9..4326403137 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/client_encryption.hh +++ b/src/mongocxx/lib/mongocxx/private/client_encryption.hh @@ -17,26 +17,26 @@ #include #include -#include -#include -#include -#include #include -#include #include #include #include -#include #include +#include + +#include + +#include +#include +#include + +#include #include #include -#include -#include +#include +#include #include -#include - -#include namespace mongocxx { namespace v_noabi { @@ -363,5 +363,3 @@ class client_encryption::impl { } // namespace v_noabi } // namespace mongocxx - -#include diff --git a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/client_session.hh b/src/mongocxx/lib/mongocxx/private/client_session.hh similarity index 96% rename from src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/client_session.hh rename to src/mongocxx/lib/mongocxx/private/client_session.hh index b3e2803aa8..f12442c2a4 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/client_session.hh +++ b/src/mongocxx/lib/mongocxx/private/client_session.hh @@ -18,20 +18,20 @@ #include -#include -#include - #include #include #include #include -#include -#include -#include -#include -#include -#include +#include + +#include +#include + +#include +#include +#include +#include namespace mongocxx { namespace v_noabi { @@ -241,5 +241,3 @@ class client_session::impl { } // namespace v_noabi } // namespace mongocxx - -#include diff --git a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/collection.hh b/src/mongocxx/lib/mongocxx/private/collection.hh similarity index 93% rename from src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/collection.hh rename to src/mongocxx/lib/mongocxx/private/collection.hh index 3d9487eb5f..aa9f2d8032 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/collection.hh +++ b/src/mongocxx/lib/mongocxx/private/collection.hh @@ -15,18 +15,18 @@ #pragma once #include -#include #include #include #include + +#include + +#include #include -#include #include #include -#include - namespace mongocxx { namespace v_noabi { @@ -66,5 +66,3 @@ class collection::impl { } // namespace v_noabi } // namespace mongocxx - -#include diff --git a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/config/private/config.hh.in b/src/mongocxx/lib/mongocxx/private/config/config.hh.in similarity index 100% rename from src/mongocxx/lib/mongocxx/v_noabi/mongocxx/config/private/config.hh.in rename to src/mongocxx/lib/mongocxx/private/config/config.hh.in diff --git a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/conversions.cpp b/src/mongocxx/lib/mongocxx/private/conversions.cpp similarity index 97% rename from src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/conversions.cpp rename to src/mongocxx/lib/mongocxx/private/conversions.cpp index 5090b6311d..d00e5f5035 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/conversions.cpp +++ b/src/mongocxx/lib/mongocxx/private/conversions.cpp @@ -16,8 +16,6 @@ #include -#include - namespace mongocxx { namespace libmongoc { namespace conversions { diff --git a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/conversions.hh b/src/mongocxx/lib/mongocxx/private/conversions.hh similarity index 84% rename from src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/conversions.hh rename to src/mongocxx/lib/mongocxx/private/conversions.hh index b22508102a..af199afc2f 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/conversions.hh +++ b/src/mongocxx/lib/mongocxx/private/conversions.hh @@ -14,11 +14,10 @@ #pragma once -#include #include -#include -#include +#include +#include namespace mongocxx { namespace libmongoc { @@ -33,5 +32,3 @@ read_mode_from_read_mode_t(mongoc_read_mode_t read_mode); } // namespace conversions } // namespace libmongoc } // namespace mongocxx - -#include diff --git a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/cursor.hh b/src/mongocxx/lib/mongocxx/private/cursor.hh similarity index 94% rename from src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/cursor.hh rename to src/mongocxx/lib/mongocxx/private/cursor.hh index f0e88fe2f7..939e2e28ba 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/cursor.hh +++ b/src/mongocxx/lib/mongocxx/private/cursor.hh @@ -18,9 +18,8 @@ #include #include -#include -#include +#include namespace mongocxx { namespace v_noabi { @@ -91,5 +90,3 @@ class cursor::impl { } // namespace v_noabi } // namespace mongocxx - -#include diff --git a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/database.hh b/src/mongocxx/lib/mongocxx/private/database.hh similarity index 92% rename from src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/database.hh rename to src/mongocxx/lib/mongocxx/private/database.hh index 7b48416588..8ede4f945b 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/database.hh +++ b/src/mongocxx/lib/mongocxx/private/database.hh @@ -16,12 +16,11 @@ #include #include + #include -#include +#include #include -#include - namespace mongocxx { namespace v_noabi { @@ -55,5 +54,3 @@ class database::impl { } // namespace v_noabi } // namespace mongocxx - -#include diff --git a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/test_util/export_for_testing.hh b/src/mongocxx/lib/mongocxx/private/export.hh similarity index 82% rename from src/mongocxx/lib/mongocxx/v_noabi/mongocxx/test_util/export_for_testing.hh rename to src/mongocxx/lib/mongocxx/private/export.hh index 4a0d149113..100d8723b7 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/test_util/export_for_testing.hh +++ b/src/mongocxx/lib/mongocxx/private/export.hh @@ -14,9 +14,9 @@ #pragma once -#include +#include -// See src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/test_util/export_for_testing.hh for an explanation of +// See src/bsoncxx/lib/bsoncxx/private/export.hh for an explanation of // the purpose of this header. #if defined(MONGOCXX_TESTING) @@ -26,5 +26,3 @@ #define MONGOCXX_ABI_EXPORT_TESTING #define MONGOCXX_ABI_EXPORT_CDECL_TESTING(...) __VA_ARGS__ #endif - -#include diff --git a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/index_view.hh b/src/mongocxx/lib/mongocxx/private/index_view.hh similarity index 98% rename from src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/index_view.hh rename to src/mongocxx/lib/mongocxx/private/index_view.hh index df5e06137e..d53dc1a898 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/index_view.hh +++ b/src/mongocxx/lib/mongocxx/private/index_view.hh @@ -28,11 +28,10 @@ #include #include #include -#include -#include -#include -#include +#include +#include +#include namespace mongocxx { namespace v_noabi { @@ -276,5 +275,3 @@ class index_view::impl { } // namespace v_noabi } // namespace mongocxx - -#include diff --git a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/test_util/mock.hh b/src/mongocxx/lib/mongocxx/private/mock.hh similarity index 98% rename from src/mongocxx/lib/mongocxx/v_noabi/mongocxx/test_util/mock.hh rename to src/mongocxx/lib/mongocxx/private/mock.hh index e505aa9d28..e584ef0bad 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/test_util/mock.hh +++ b/src/mongocxx/lib/mongocxx/private/mock.hh @@ -28,8 +28,6 @@ #include -#include - namespace mongocxx { namespace test_util { @@ -187,5 +185,3 @@ class mock { } // namespace test_util } // namespace mongocxx - -#include diff --git a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/libmongoc.cpp b/src/mongocxx/lib/mongocxx/private/mongoc.cpp similarity index 67% rename from src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/libmongoc.cpp rename to src/mongocxx/lib/mongocxx/private/mongoc.cpp index 2ecf27c816..4e7f5e5757 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/libmongoc.cpp +++ b/src/mongocxx/lib/mongocxx/private/mongoc.cpp @@ -12,32 +12,25 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "libmongoc.hh" - -#include +#include namespace mongocxx { namespace libmongoc { #ifdef MONGOCXX_TESTING -#if defined(__GNUC__) && (__GNUC__ >= 6) && !defined(__clang__) -// See libmongoc.hh for details on this diagnostic suppression -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wignored-attributes" -#endif +SILENCE_IGNORED_ATTRIBUTES_BEGIN(); -#define MONGOCXX_LIBMONGOC_SYMBOL(name) \ +#pragma push_macro("X") +#define X(name) \ test_util::mock& name = *new test_util::mock(mongoc_##name); -#include "libmongoc_symbols.hh" -#undef MONGOCXX_LIBMONGOC_SYMBOL +MONGOC_SYMBOLS_XMACRO(X) +#pragma pop_macro("X") mongocxx::test_util::mock& log_set_handler = *new test_util::mock(mongoc_log_set_handler); -#if defined(__GNUC__) && (__GNUC__ >= 6) && !defined(__clang__) -#pragma GCC diagnostic pop -#endif +SILENCE_IGNORED_ATTRIBUTES_END(); #endif // MONGOCXX_TESTING diff --git a/src/mongocxx/lib/mongocxx/private/mongoc.hh b/src/mongocxx/lib/mongocxx/private/mongoc.hh new file mode 100644 index 0000000000..9e09525f77 --- /dev/null +++ b/src/mongocxx/lib/mongocxx/private/mongoc.hh @@ -0,0 +1,450 @@ +// Copyright 2009-present MongoDB, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#pragma once + +#include + +#include + +#include +#include + +BSONCXX_PRIVATE_WARNINGS_PUSH(); +BSONCXX_PRIVATE_WARNINGS_DISABLE(GNU("-Wconversion")); +BSONCXX_PRIVATE_IF_MSVC(BSONCXX_PRIVATE_PRAGMA(warning(push, 1));) +#include +BSONCXX_PRIVATE_WARNINGS_POP(); + +// See https://jira.mongodb.com/browse/CXX-1453 and +// https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81605 The basic issue +// is that GCC sees the visibility attributes on the mongoc functions, +// and considers them part of the type, and then emits a silly +// diagnostic stating that the attribute was ignored. +#if defined(__GNUC__) && (__GNUC__ >= 6) && !defined(__clang__) +#define SILENCE_IGNORED_ATTRIBUTES_BEGIN() \ + BSONCXX_PRIVATE_WARNINGS_PUSH(); \ + BSONCXX_PRIVATE_WARNINGS_DISABLE(GCC("-Wignored-attributes")) +#define SILENCE_IGNORED_ATTRIBUTES_END() BSONCXX_PRIVATE_WARNINGS_POP() +#else +#define SILENCE_IGNORED_ATTRIBUTES_BEGIN() +#define SILENCE_IGNORED_ATTRIBUTES_END() +#endif + +#if defined(MONGOC_ENABLE_SSL) +#define MONGOC_SYMBOLS_SSL_XMACRO(X) \ + X(client_pool_set_ssl_opts) \ + X(client_set_ssl_opts) +#else +#define MONGOC_SYMBOLS_SSL_XMACRO(X) +#endif + +#pragma push_macro("MONGOC_SYMBOLS_XMACRO") +#define MONGOC_SYMBOLS_XMACRO(X) \ + MONGOC_SYMBOLS_SSL_XMACRO(X) \ + X(apm_callbacks_destroy) \ + X(apm_callbacks_new) \ + X(apm_command_failed_get_command_name) \ + X(apm_command_failed_get_context) \ + X(apm_command_failed_get_duration) \ + X(apm_command_failed_get_error) \ + X(apm_command_failed_get_host) \ + X(apm_command_failed_get_operation_id) \ + X(apm_command_failed_get_reply) \ + X(apm_command_failed_get_request_id) \ + X(apm_command_failed_get_server_id) \ + X(apm_command_failed_get_service_id) \ + X(apm_command_started_get_command_name) \ + X(apm_command_started_get_command) \ + X(apm_command_started_get_context) \ + X(apm_command_started_get_database_name) \ + X(apm_command_started_get_host) \ + X(apm_command_started_get_operation_id) \ + X(apm_command_started_get_request_id) \ + X(apm_command_started_get_server_id) \ + X(apm_command_started_get_service_id) \ + X(apm_command_succeeded_get_command_name) \ + X(apm_command_succeeded_get_context) \ + X(apm_command_succeeded_get_duration) \ + X(apm_command_succeeded_get_host) \ + X(apm_command_succeeded_get_operation_id) \ + X(apm_command_succeeded_get_reply) \ + X(apm_command_succeeded_get_request_id) \ + X(apm_command_succeeded_get_server_id) \ + X(apm_command_succeeded_get_service_id) \ + X(apm_server_changed_get_context) \ + X(apm_server_changed_get_host) \ + X(apm_server_changed_get_new_description) \ + X(apm_server_changed_get_previous_description) \ + X(apm_server_changed_get_topology_id) \ + X(apm_server_closed_get_context) \ + X(apm_server_closed_get_host) \ + X(apm_server_closed_get_topology_id) \ + X(apm_server_heartbeat_failed_get_awaited) \ + X(apm_server_heartbeat_failed_get_context) \ + X(apm_server_heartbeat_failed_get_duration) \ + X(apm_server_heartbeat_failed_get_error) \ + X(apm_server_heartbeat_failed_get_host) \ + X(apm_server_heartbeat_started_get_awaited) \ + X(apm_server_heartbeat_started_get_context) \ + X(apm_server_heartbeat_started_get_host) \ + X(apm_server_heartbeat_succeeded_get_awaited) \ + X(apm_server_heartbeat_succeeded_get_context) \ + X(apm_server_heartbeat_succeeded_get_duration) \ + X(apm_server_heartbeat_succeeded_get_host) \ + X(apm_server_heartbeat_succeeded_get_reply) \ + X(apm_server_opening_get_context) \ + X(apm_server_opening_get_host) \ + X(apm_server_opening_get_topology_id) \ + X(apm_set_command_failed_cb) \ + X(apm_set_command_started_cb) \ + X(apm_set_command_succeeded_cb) \ + X(apm_set_server_changed_cb) \ + X(apm_set_server_closed_cb) \ + X(apm_set_server_heartbeat_failed_cb) \ + X(apm_set_server_heartbeat_started_cb) \ + X(apm_set_server_heartbeat_succeeded_cb) \ + X(apm_set_server_opening_cb) \ + X(apm_set_topology_changed_cb) \ + X(apm_set_topology_closed_cb) \ + X(apm_set_topology_opening_cb) \ + X(apm_topology_changed_get_context) \ + X(apm_topology_changed_get_new_description) \ + X(apm_topology_changed_get_previous_description) \ + X(apm_topology_changed_get_topology_id) \ + X(apm_topology_closed_get_context) \ + X(apm_topology_closed_get_topology_id) \ + X(apm_topology_opening_get_context) \ + X(apm_topology_opening_get_topology_id) \ + X(auto_encryption_opts_destroy) \ + X(auto_encryption_opts_new) \ + X(auto_encryption_opts_set_bypass_auto_encryption) \ + X(auto_encryption_opts_set_bypass_query_analysis) \ + X(auto_encryption_opts_set_encrypted_fields_map) \ + X(auto_encryption_opts_set_extra) \ + X(auto_encryption_opts_set_keyvault_client_pool) \ + X(auto_encryption_opts_set_keyvault_client) \ + X(auto_encryption_opts_set_keyvault_namespace) \ + X(auto_encryption_opts_set_kms_providers) \ + X(auto_encryption_opts_set_schema_map) \ + X(auto_encryption_opts_set_tls_opts) \ + X(bulk_operation_destroy) \ + X(bulk_operation_execute) \ + X(bulk_operation_get_write_concern) \ + X(bulk_operation_insert_with_opts) \ + X(bulk_operation_new) \ + X(bulk_operation_remove_many_with_opts) \ + X(bulk_operation_remove_one_with_opts) \ + X(bulk_operation_replace_one_with_opts) \ + X(bulk_operation_set_bypass_document_validation) \ + X(bulk_operation_set_client_session) \ + X(bulk_operation_set_client) \ + X(bulk_operation_set_collection) \ + X(bulk_operation_set_database) \ + X(bulk_operation_set_write_concern) \ + X(bulk_operation_update_many_with_opts) \ + X(bulk_operation_update_one_with_opts) \ + X(change_stream_destroy) \ + X(change_stream_error_document) \ + X(change_stream_get_resume_token) \ + X(change_stream_next) \ + X(cleanup) \ + X(client_command_simple_with_server_id) \ + X(client_destroy) \ + X(client_enable_auto_encryption) \ + X(client_encryption_add_key_alt_name) \ + X(client_encryption_create_datakey) \ + X(client_encryption_create_encrypted_collection) \ + X(client_encryption_datakey_opts_destroy) \ + X(client_encryption_datakey_opts_new) \ + X(client_encryption_datakey_opts_set_keyaltnames) \ + X(client_encryption_datakey_opts_set_keymaterial) \ + X(client_encryption_datakey_opts_set_masterkey) \ + X(client_encryption_decrypt) \ + X(client_encryption_delete_key) \ + X(client_encryption_destroy) \ + X(client_encryption_encrypt_expression) \ + X(client_encryption_encrypt_opts_destroy) \ + X(client_encryption_encrypt_opts_new) \ + X(client_encryption_encrypt_opts_set_algorithm) \ + X(client_encryption_encrypt_opts_set_contention_factor) \ + X(client_encryption_encrypt_opts_set_keyaltname) \ + X(client_encryption_encrypt_opts_set_keyid) \ + X(client_encryption_encrypt_opts_set_query_type) \ + X(client_encryption_encrypt_opts_set_range_opts) \ + X(client_encryption_encrypt_range_opts_destroy) \ + X(client_encryption_encrypt_range_opts_new) \ + X(client_encryption_encrypt_range_opts_set_max) \ + X(client_encryption_encrypt_range_opts_set_min) \ + X(client_encryption_encrypt_range_opts_set_precision) \ + X(client_encryption_encrypt_range_opts_set_sparsity) \ + X(client_encryption_encrypt_range_opts_set_trim_factor) \ + X(client_encryption_encrypt) \ + X(client_encryption_get_key_by_alt_name) \ + X(client_encryption_get_key) \ + X(client_encryption_get_keys) \ + X(client_encryption_new) \ + X(client_encryption_opts_destroy) \ + X(client_encryption_opts_new) \ + X(client_encryption_opts_set_keyvault_client) \ + X(client_encryption_opts_set_keyvault_namespace) \ + X(client_encryption_opts_set_kms_providers) \ + X(client_encryption_opts_set_tls_opts) \ + X(client_encryption_remove_key_alt_name) \ + X(client_encryption_rewrap_many_datakey_result_destroy) \ + X(client_encryption_rewrap_many_datakey_result_get_bulk_write_result) \ + X(client_encryption_rewrap_many_datakey_result_new) \ + X(client_encryption_rewrap_many_datakey) \ + X(client_find_databases_with_opts) \ + X(client_get_collection) \ + X(client_get_database_names_with_opts) \ + X(client_get_database) \ + X(client_get_read_concern) \ + X(client_get_read_prefs) \ + X(client_get_uri) \ + X(client_get_write_concern) \ + X(client_new_from_uri) \ + X(client_pool_destroy) \ + X(client_pool_enable_auto_encryption) \ + X(client_pool_new_with_error) \ + X(client_pool_new) \ + X(client_pool_pop) \ + X(client_pool_push) \ + X(client_pool_set_apm_callbacks) \ + X(client_pool_set_server_api) \ + X(client_pool_try_pop) \ + X(client_reset) \ + X(client_select_server) \ + X(client_session_abort_transaction) \ + X(client_session_advance_cluster_time) \ + X(client_session_advance_operation_time) \ + X(client_session_append) \ + X(client_session_commit_transaction) \ + X(client_session_destroy) \ + X(client_session_get_cluster_time) \ + X(client_session_get_dirty) \ + X(client_session_get_lsid) \ + X(client_session_get_operation_time) \ + X(client_session_get_opts) \ + X(client_session_get_server_id) \ + X(client_session_get_transaction_state) \ + X(client_session_in_transaction) \ + X(client_session_start_transaction) \ + X(client_session_with_transaction) \ + X(client_set_apm_callbacks) \ + X(client_set_read_concern) \ + X(client_set_read_prefs) \ + X(client_set_server_api) \ + X(client_set_write_concern) \ + X(client_start_session) \ + X(client_watch) \ + X(collection_aggregate) \ + X(collection_command_simple) \ + X(collection_copy) \ + X(collection_count_documents) \ + /* Remove these suppressions when CXX-1594 is done. */ \ + BSONCXX_SUPPRESS_DEPRECATION_WARNINGS_BEGIN \ + X(collection_count_with_opts) \ + BSONCXX_SUPPRESS_DEPRECATION_WARNINGS_END \ + X(collection_create_bulk_operation_with_opts) \ + X(collection_destroy) \ + X(collection_drop_index) \ + X(collection_drop_with_opts) \ + X(collection_drop) \ + X(collection_estimated_document_count) \ + X(collection_find_and_modify_with_opts) \ + X(collection_find_indexes_with_opts) \ + X(collection_find_with_opts) \ + X(collection_get_name) \ + X(collection_get_read_concern) \ + X(collection_get_read_prefs) \ + X(collection_get_write_concern) \ + X(collection_keys_to_index_string) \ + X(collection_read_command_with_opts) \ + X(collection_rename_with_opts) \ + X(collection_rename) \ + X(collection_set_read_concern) \ + X(collection_set_read_prefs) \ + X(collection_set_write_concern) \ + X(collection_watch) \ + X(collection_write_command_with_opts) \ + X(cursor_destroy) \ + X(cursor_error_document) \ + X(cursor_error) \ + X(cursor_new_from_command_reply_with_opts) \ + X(cursor_next) \ + X(cursor_set_max_await_time_ms) \ + X(database_aggregate) \ + X(database_command_with_opts) \ + X(database_copy) \ + X(database_create_collection) \ + X(database_destroy) \ + X(database_drop_with_opts) \ + X(database_drop) \ + X(database_find_collections_with_opts) \ + X(database_get_collection_names_with_opts) \ + X(database_get_collection) \ + X(database_get_read_concern) \ + X(database_get_read_prefs) \ + X(database_get_write_concern) \ + X(database_has_collection) \ + X(database_set_read_concern) \ + X(database_set_read_prefs) \ + X(database_set_write_concern) \ + X(database_watch) \ + X(error_has_label) \ + X(find_and_modify_opts_append) \ + X(find_and_modify_opts_destroy) \ + X(find_and_modify_opts_new) \ + X(find_and_modify_opts_set_bypass_document_validation) \ + X(find_and_modify_opts_set_fields) \ + X(find_and_modify_opts_set_flags) \ + X(find_and_modify_opts_set_max_time_ms) \ + X(find_and_modify_opts_set_sort) \ + X(find_and_modify_opts_set_update) \ + X(handshake_data_append) \ + X(index_opt_geo_init) \ + X(index_opt_init) \ + X(index_opt_wt_init) \ + X(init) \ + /* X(log_set_handler) CDRIVER-5678: not __cdecl. */ \ + X(read_concern_copy) \ + X(read_concern_destroy) \ + X(read_concern_get_level) \ + X(read_concern_new) \ + X(read_concern_set_level) \ + X(read_prefs_copy) \ + X(read_prefs_destroy) \ + X(read_prefs_get_hedge) \ + X(read_prefs_get_max_staleness_seconds) \ + X(read_prefs_get_mode) \ + X(read_prefs_get_tags) \ + X(read_prefs_new) \ + X(read_prefs_set_hedge) \ + X(read_prefs_set_max_staleness_seconds) \ + X(read_prefs_set_mode) \ + X(read_prefs_set_tags) \ + X(server_api_copy) \ + X(server_api_deprecation_errors) \ + X(server_api_destroy) \ + X(server_api_get_deprecation_errors) \ + X(server_api_get_strict) \ + X(server_api_get_version) \ + X(server_api_new) \ + X(server_api_strict) \ + X(server_api_version_from_string) \ + X(server_api_version_to_string) \ + X(server_description_hello_response) \ + X(server_description_host) \ + X(server_description_id) \ + X(server_description_round_trip_time) \ + X(server_description_type) \ + X(server_descriptions_destroy_all) \ + X(session_opts_destroy) \ + X(session_opts_get_causal_consistency) \ + X(session_opts_get_snapshot) \ + X(session_opts_new) \ + X(session_opts_set_causal_consistency) \ + X(session_opts_set_default_transaction_opts) \ + X(session_opts_set_snapshot) \ + X(topology_description_get_servers) \ + X(topology_description_has_readable_server) \ + X(topology_description_has_writable_server) \ + X(topology_description_type) \ + X(transaction_opts_clone) \ + X(transaction_opts_destroy) \ + X(transaction_opts_get_max_commit_time_ms) \ + X(transaction_opts_get_read_concern) \ + X(transaction_opts_get_read_prefs) \ + X(transaction_opts_get_write_concern) \ + X(transaction_opts_new) \ + X(transaction_opts_set_max_commit_time_ms) \ + X(transaction_opts_set_read_concern) \ + X(transaction_opts_set_read_prefs) \ + X(transaction_opts_set_write_concern) \ + X(uri_copy) \ + X(uri_destroy) \ + X(uri_get_auth_mechanism) \ + X(uri_get_auth_source) \ + X(uri_get_compressors) \ + X(uri_get_credentials) \ + X(uri_get_database) \ + X(uri_get_hosts) \ + X(uri_get_option_as_utf8) \ + X(uri_get_options) \ + X(uri_get_password) \ + X(uri_get_read_concern) \ + X(uri_get_read_prefs_t) \ + X(uri_get_replica_set) \ + BSONCXX_SUPPRESS_DEPRECATION_WARNINGS_BEGIN \ + X(uri_get_ssl) \ + BSONCXX_SUPPRESS_DEPRECATION_WARNINGS_END \ + X(uri_get_string) \ + X(uri_get_tls) \ + X(uri_get_username) \ + X(uri_get_write_concern) \ + X(uri_new_with_error) \ + X(write_concern_copy) \ + X(write_concern_destroy) \ + X(write_concern_get_journal) \ + X(write_concern_get_w) \ + X(write_concern_get_wmajority) \ + X(write_concern_get_wtag) \ + X(write_concern_get_wtimeout) \ + X(write_concern_is_acknowledged) \ + X(write_concern_journal_is_set) \ + X(write_concern_new) \ + X(write_concern_set_journal) \ + X(write_concern_set_w) \ + X(write_concern_set_wmajority) \ + X(write_concern_set_wtag) \ + X(write_concern_set_wtimeout) + +namespace mongocxx { +namespace libmongoc { + +#if defined(MONGOCXX_TESTING) + +SILENCE_IGNORED_ATTRIBUTES_BEGIN(); + +#pragma push_macro("X") +#undef X +#define X(name) extern MONGOCXX_ABI_EXPORT_TESTING mongocxx::test_util::mock& name; +MONGOC_SYMBOLS_XMACRO(X) +#pragma pop_macro("X") + +// CDRIVER-5678 +using log_func_cdecl_t = void( + MONGOCXX_ABI_CDECL*)(mongoc_log_level_t log_level, char const* log_domain, char const* message, void* user_data); +using log_set_handler_cdecl_t = void(MONGOCXX_ABI_CDECL*)(log_func_cdecl_t log_func, void* user_data); + +extern MONGOCXX_ABI_EXPORT_TESTING mongocxx::test_util::mock& log_set_handler; + +SILENCE_IGNORED_ATTRIBUTES_END(); + +#else // defined(MONGOCXX_TESTING) ^|v !defined(MONGOCXX_TESTING) + +#pragma push_macro("X") +#undef X +#define X(name) constexpr auto name = mongoc_##name; +MONGOC_SYMBOLS_XMACRO(X) +#pragma pop_macro("X") + +// CDRIVER-5678 +constexpr auto log_set_handler = mongoc_log_set_handler; + +#endif // !defined(MONGOCXX_TESTING) + +} // namespace libmongoc +} // namespace mongocxx diff --git a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/exception/private/mongoc_error.hh b/src/mongocxx/lib/mongocxx/private/mongoc_error.hh similarity index 94% rename from src/mongocxx/lib/mongocxx/v_noabi/mongocxx/exception/private/mongoc_error.hh rename to src/mongocxx/lib/mongocxx/private/mongoc_error.hh index 86d3263204..f69fe2731d 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/exception/private/mongoc_error.hh +++ b/src/mongocxx/lib/mongocxx/private/mongoc_error.hh @@ -18,9 +18,8 @@ #include #include -#include -#include +#include namespace mongocxx { namespace v_noabi { @@ -64,5 +63,3 @@ void throw_exception(bsoncxx::v_noabi::document::value raw_server_error, ::bson_ } // namespace v_noabi } // namespace mongocxx - -#include diff --git a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/numeric_casting.cpp b/src/mongocxx/lib/mongocxx/private/numeric_casting.cpp similarity index 97% rename from src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/numeric_casting.cpp rename to src/mongocxx/lib/mongocxx/private/numeric_casting.cpp index 7696d57fbc..806aecb63f 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/numeric_casting.cpp +++ b/src/mongocxx/lib/mongocxx/private/numeric_casting.cpp @@ -16,8 +16,6 @@ #include -#include - namespace mongocxx { bool size_t_to_int64_safe(std::size_t const in, int64_t& out) { diff --git a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/numeric_casting.hh b/src/mongocxx/lib/mongocxx/private/numeric_casting.hh similarity index 92% rename from src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/numeric_casting.hh rename to src/mongocxx/lib/mongocxx/private/numeric_casting.hh index 6eb2b0c867..54f1665a7a 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/numeric_casting.hh +++ b/src/mongocxx/lib/mongocxx/private/numeric_casting.hh @@ -17,9 +17,7 @@ #include #include -#include - -#include +#include namespace mongocxx { @@ -44,5 +42,3 @@ MONGOCXX_ABI_EXPORT_CDECL_TESTING(bool) int32_to_size_t_safe(int32_t const in, s MONGOCXX_ABI_EXPORT_CDECL_TESTING(bool) int64_to_size_t_safe(int64_t const in, std::size_t& out); } // namespace mongocxx - -#include diff --git a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/pipeline.hh b/src/mongocxx/lib/mongocxx/private/pipeline.hh similarity index 92% rename from src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/pipeline.hh rename to src/mongocxx/lib/mongocxx/private/pipeline.hh index 1a9f4fb6dc..38cfe19659 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/pipeline.hh +++ b/src/mongocxx/lib/mongocxx/private/pipeline.hh @@ -18,8 +18,6 @@ #include -#include - namespace mongocxx { namespace v_noabi { @@ -46,5 +44,3 @@ class pipeline::impl { } // namespace v_noabi } // namespace mongocxx - -#include diff --git a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/pool.hh b/src/mongocxx/lib/mongocxx/private/pool.hh similarity index 90% rename from src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/pool.hh rename to src/mongocxx/lib/mongocxx/private/pool.hh index 717ce6e28d..b474ba2d74 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/pool.hh +++ b/src/mongocxx/lib/mongocxx/private/pool.hh @@ -18,9 +18,8 @@ #include #include -#include -#include +#include namespace mongocxx { namespace v_noabi { @@ -46,5 +45,3 @@ class pool::impl { } // namespace v_noabi } // namespace mongocxx - -#include diff --git a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/read_concern.hh b/src/mongocxx/lib/mongocxx/private/read_concern.hh similarity index 89% rename from src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/read_concern.hh rename to src/mongocxx/lib/mongocxx/private/read_concern.hh index 00cff1cacf..3d646fadbf 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/read_concern.hh +++ b/src/mongocxx/lib/mongocxx/private/read_concern.hh @@ -14,10 +14,9 @@ #pragma once -#include #include -#include +#include namespace mongocxx { namespace v_noabi { @@ -41,5 +40,3 @@ class read_concern::impl { } // namespace v_noabi } // namespace mongocxx - -#include diff --git a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/read_preference.hh b/src/mongocxx/lib/mongocxx/private/read_preference.hh similarity index 89% rename from src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/read_preference.hh rename to src/mongocxx/lib/mongocxx/private/read_preference.hh index b4410aa1b0..a976e165c4 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/read_preference.hh +++ b/src/mongocxx/lib/mongocxx/private/read_preference.hh @@ -14,10 +14,9 @@ #pragma once -#include #include -#include +#include namespace mongocxx { namespace v_noabi { @@ -41,5 +40,3 @@ class read_preference::impl { } // namespace v_noabi } // namespace mongocxx - -#include diff --git a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/scoped_bson_value.hh b/src/mongocxx/lib/mongocxx/private/scoped_bson_value.hh similarity index 96% rename from src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/scoped_bson_value.hh rename to src/mongocxx/lib/mongocxx/private/scoped_bson_value.hh index 2027ed366d..07697f779d 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/scoped_bson_value.hh +++ b/src/mongocxx/lib/mongocxx/private/scoped_bson_value.hh @@ -17,9 +17,10 @@ #include #include -#include -#include +#include + +#include namespace mongocxx { namespace detail { diff --git a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/search_index_model.hh b/src/mongocxx/lib/mongocxx/private/search_index_model.hh similarity index 88% rename from src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/search_index_model.hh rename to src/mongocxx/lib/mongocxx/private/search_index_model.hh index f6b9581240..331ffd2f11 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/search_index_model.hh +++ b/src/mongocxx/lib/mongocxx/private/search_index_model.hh @@ -4,8 +4,6 @@ #include -#include - namespace mongocxx { namespace v_noabi { @@ -22,5 +20,3 @@ class search_index_model::impl { } // namespace v_noabi } // namespace mongocxx - -#include diff --git a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/search_index_view.hh b/src/mongocxx/lib/mongocxx/private/search_index_view.hh similarity index 97% rename from src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/search_index_view.hh rename to src/mongocxx/lib/mongocxx/private/search_index_view.hh index 88b7ce0ed7..42db01131d 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/search_index_view.hh +++ b/src/mongocxx/lib/mongocxx/private/search_index_view.hh @@ -7,13 +7,12 @@ #include #include -#include -#include -#include -#include #include -#include +#include +#include +#include +#include namespace mongocxx { namespace v_noabi { @@ -205,5 +204,3 @@ class search_index_view::impl { } // namespace v_noabi } // namespace mongocxx - -#include diff --git a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/uri.hh b/src/mongocxx/lib/mongocxx/private/uri.hh similarity index 88% rename from src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/uri.hh rename to src/mongocxx/lib/mongocxx/private/uri.hh index ad8edf0706..0bf3e439ad 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/uri.hh +++ b/src/mongocxx/lib/mongocxx/private/uri.hh @@ -14,10 +14,9 @@ #pragma once -#include #include -#include +#include namespace mongocxx { namespace v_noabi { @@ -37,5 +36,3 @@ class uri::impl { } // namespace v_noabi } // namespace mongocxx - -#include diff --git a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/write_concern.hh b/src/mongocxx/lib/mongocxx/private/write_concern.hh similarity index 89% rename from src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/write_concern.hh rename to src/mongocxx/lib/mongocxx/private/write_concern.hh index 3cd9ca5941..d2d7740a3e 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/write_concern.hh +++ b/src/mongocxx/lib/mongocxx/private/write_concern.hh @@ -14,10 +14,9 @@ #pragma once -#include #include -#include +#include namespace mongocxx { namespace v_noabi { @@ -41,5 +40,3 @@ class write_concern::impl { } // namespace v_noabi } // namespace mongocxx - -#include diff --git a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/bulk_write.cpp b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/bulk_write.cpp index a34839c209..327286adda 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/bulk_write.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/bulk_write.cpp @@ -14,22 +14,22 @@ #include #include -#include #include #include #include #include -#include + +#include + +#include #include #include #include -#include -#include +#include +#include #include -#include - namespace mongocxx { namespace v_noabi { diff --git a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/change_stream.cpp b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/change_stream.cpp index 611b05d60a..e04c81882c 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/change_stream.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/change_stream.cpp @@ -14,13 +14,12 @@ #include +#include + #include -#include #include -#include - -#include +#include namespace mongocxx { namespace v_noabi { diff --git a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/client.cpp b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/client.cpp index adad108180..7bc5d43418 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/client.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/client.cpp @@ -13,28 +13,29 @@ // limitations under the License. #include -#include #include #include #include #include -#include #include -#include -#include -#include + +#include +#include +#include + +#include + +#include #include #include -#include +#include #include #include #include #include #include -#include - namespace mongocxx { namespace v_noabi { diff --git a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/client_encryption.cpp b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/client_encryption.cpp index 796f2cf7af..6798f99c1d 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/client_encryption.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/client_encryption.cpp @@ -12,14 +12,13 @@ // See the License for the specific language governing permissions and // limitations under the License. +#include + #include -#include #include #include -#include - namespace mongocxx { namespace v_noabi { diff --git a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/client_session.cpp b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/client_session.cpp index e127ceb648..d8f911618a 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/client_session.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/client_session.cpp @@ -12,14 +12,13 @@ // See the License for the specific language governing permissions and // limitations under the License. +#include + #include -#include -#include #include #include - -#include +#include namespace mongocxx { namespace v_noabi { diff --git a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/collection.cpp b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/collection.cpp index c5f9a8cc59..c5f23b60e8 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/collection.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/collection.cpp @@ -24,9 +24,6 @@ #include #include #include -#include -#include -#include #include #include @@ -36,29 +33,32 @@ #include #include #include -#include #include #include #include #include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include #include #include #include #include -#include -#include +#include +#include #include #include #include #include -#include -#include -#include -#include -#include -#include - -#include using bsoncxx::v_noabi::builder::concatenate; using bsoncxx::v_noabi::builder::basic::kvp; diff --git a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/config/private/prelude.hh b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/config/private/prelude.hh deleted file mode 100644 index d01e52a4fa..0000000000 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/config/private/prelude.hh +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright 2009-present MongoDB, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#include - -// NOTE: Push any macros here that are defined by the following -// headers here. - -// config.hh (generated by CMake) -#pragma push_macro("MONGOCXX_ENABLE_SSL") -#undef MONGOCXX_ENABLE_SSL -#pragma push_macro("MONGOCXX_COMPILER_ID") -#undef MONGOCXX_COMPILER_ID -#pragma push_macro("MONGOCXX_COMPILER_VERSION") -#undef MONGOCXX_COMPILER_VERSION - -#include diff --git a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/cursor.cpp b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/cursor.cpp index 599b2dd203..0e505c72bc 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/cursor.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/cursor.cpp @@ -12,16 +12,15 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include -#include - #include -#include #include -#include -#include -#include +#include +#include + +#include +#include +#include namespace mongocxx { namespace v_noabi { diff --git a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/database.cpp b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/database.cpp index 6f0997ed5b..c2bd95e964 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/database.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/database.cpp @@ -17,7 +17,6 @@ #include #include #include -#include #include #include @@ -25,18 +24,19 @@ #include #include #include -#include + +#include + +#include #include #include #include -#include -#include +#include +#include #include #include #include -#include - using bsoncxx::v_noabi::builder::concatenate; using bsoncxx::v_noabi::builder::basic::kvp; using bsoncxx::v_noabi::builder::basic::make_document; diff --git a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/events/command_failed_event.cpp b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/events/command_failed_event.cpp index 8996192c80..35ffe8d986 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/events/command_failed_event.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/events/command_failed_event.cpp @@ -13,15 +13,15 @@ // limitations under the License. #include -#include -#include -#include #include #include -#include -#include +#include +#include +#include + +#include namespace mongocxx { namespace v_noabi { diff --git a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/events/command_started_event.cpp b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/events/command_started_event.cpp index e9b7900ecf..9eee795221 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/events/command_started_event.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/events/command_started_event.cpp @@ -12,13 +12,12 @@ // See the License for the specific language governing permissions and // limitations under the License. +#include + #include #include -#include -#include - -#include +#include namespace mongocxx { namespace v_noabi { diff --git a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/events/command_succeeded_event.cpp b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/events/command_succeeded_event.cpp index 965c532fa3..e3745f741d 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/events/command_succeeded_event.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/events/command_succeeded_event.cpp @@ -12,13 +12,12 @@ // See the License for the specific language governing permissions and // limitations under the License. +#include + #include #include -#include -#include - -#include +#include namespace mongocxx { namespace v_noabi { diff --git a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/events/heartbeat_failed_event.cpp b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/events/heartbeat_failed_event.cpp index 110d7b6301..9cb5bb8d16 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/events/heartbeat_failed_event.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/events/heartbeat_failed_event.cpp @@ -13,9 +13,8 @@ // limitations under the License. #include -#include -#include +#include namespace mongocxx { namespace v_noabi { diff --git a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/events/heartbeat_started_event.cpp b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/events/heartbeat_started_event.cpp index a19d348690..f58b446721 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/events/heartbeat_started_event.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/events/heartbeat_started_event.cpp @@ -13,9 +13,8 @@ // limitations under the License. #include -#include -#include +#include namespace mongocxx { namespace v_noabi { diff --git a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/events/heartbeat_succeeded_event.cpp b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/events/heartbeat_succeeded_event.cpp index e8728fed05..bbad277174 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/events/heartbeat_succeeded_event.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/events/heartbeat_succeeded_event.cpp @@ -13,9 +13,8 @@ // limitations under the License. #include -#include -#include +#include namespace mongocxx { namespace v_noabi { diff --git a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/events/server_changed_event.cpp b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/events/server_changed_event.cpp index 3729355f8e..8d8e85fe97 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/events/server_changed_event.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/events/server_changed_event.cpp @@ -13,9 +13,8 @@ // limitations under the License. #include -#include -#include +#include namespace mongocxx { namespace v_noabi { diff --git a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/events/server_closed_event.cpp b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/events/server_closed_event.cpp index 814381b9dc..645f218060 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/events/server_closed_event.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/events/server_closed_event.cpp @@ -13,9 +13,8 @@ // limitations under the License. #include -#include -#include +#include namespace mongocxx { namespace v_noabi { diff --git a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/events/server_description.cpp b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/events/server_description.cpp index 3e8120d13d..479b59e09b 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/events/server_description.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/events/server_description.cpp @@ -13,9 +13,8 @@ // limitations under the License. #include -#include -#include +#include namespace mongocxx { namespace v_noabi { diff --git a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/events/server_opening_event.cpp b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/events/server_opening_event.cpp index 5e97cf7d51..4259757010 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/events/server_opening_event.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/events/server_opening_event.cpp @@ -13,9 +13,8 @@ // limitations under the License. #include -#include -#include +#include namespace mongocxx { namespace v_noabi { diff --git a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/events/topology_changed_event.cpp b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/events/topology_changed_event.cpp index 03c1072d44..f1cc1bb30e 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/events/topology_changed_event.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/events/topology_changed_event.cpp @@ -13,9 +13,8 @@ // limitations under the License. #include -#include -#include +#include namespace mongocxx { namespace v_noabi { diff --git a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/events/topology_closed_event.cpp b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/events/topology_closed_event.cpp index 73d73254c7..f1194ec5ad 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/events/topology_closed_event.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/events/topology_closed_event.cpp @@ -13,9 +13,8 @@ // limitations under the License. #include -#include -#include +#include namespace mongocxx { namespace v_noabi { diff --git a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/events/topology_description.cpp b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/events/topology_description.cpp index f47b1d7e07..4f8be5f82b 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/events/topology_description.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/events/topology_description.cpp @@ -13,10 +13,9 @@ // limitations under the License. #include -#include -#include -#include +#include +#include namespace mongocxx { namespace v_noabi { diff --git a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/events/topology_opening_event.cpp b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/events/topology_opening_event.cpp index 6daededbac..5bbca9ce9c 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/events/topology_opening_event.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/events/topology_opening_event.cpp @@ -13,9 +13,8 @@ // limitations under the License. #include -#include -#include +#include namespace mongocxx { namespace v_noabi { diff --git a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/exception/error_code.cpp b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/exception/error_code.cpp index 3a657d74d3..9631db7333 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/exception/error_code.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/exception/error_code.cpp @@ -16,8 +16,6 @@ #include -#include - namespace mongocxx { namespace v_noabi { diff --git a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/exception/operation_exception.cpp b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/exception/operation_exception.cpp index 02d59c4f8d..3b0f1c5feb 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/exception/operation_exception.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/exception/operation_exception.cpp @@ -18,10 +18,9 @@ #include #include -#include -#include -#include +#include +#include namespace mongocxx { namespace v_noabi { diff --git a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/exception/server_error_code.cpp b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/exception/server_error_code.cpp index 0157369eb0..b53efa88bf 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/exception/server_error_code.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/exception/server_error_code.cpp @@ -16,8 +16,6 @@ #include -#include - namespace mongocxx { namespace v_noabi { diff --git a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/gridfs/bucket.cpp b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/gridfs/bucket.cpp index a59a44f9f0..906b1af6e8 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/gridfs/bucket.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/gridfs/bucket.cpp @@ -21,7 +21,6 @@ #include #include #include -#include #include #include @@ -29,12 +28,14 @@ #include #include #include -#include #include #include -#include -#include +#include + +#include + +#include namespace mongocxx { namespace v_noabi { diff --git a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/gridfs/private/bucket.hh b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/gridfs/bucket.hh similarity index 92% rename from src/mongocxx/lib/mongocxx/v_noabi/mongocxx/gridfs/private/bucket.hh rename to src/mongocxx/lib/mongocxx/v_noabi/mongocxx/gridfs/bucket.hh index 5910a47f76..a7ce56b1f2 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/gridfs/private/bucket.hh +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/gridfs/bucket.hh @@ -14,13 +14,14 @@ #pragma once +#include + +// + #include #include #include -#include - -#include namespace mongocxx { namespace v_noabi { @@ -54,5 +55,3 @@ class bucket::impl { } // namespace gridfs } // namespace v_noabi } // namespace mongocxx - -#include diff --git a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/gridfs/downloader.cpp b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/gridfs/downloader.cpp index f771c9533e..be4a49fdac 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/gridfs/downloader.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/gridfs/downloader.cpp @@ -12,21 +12,23 @@ // See the License for the specific language governing permissions and // limitations under the License. +#include + +// + #include #include #include #include -#include #include #include #include -#include -#include -#include -#include +#include + +#include namespace mongocxx { namespace v_noabi { diff --git a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/gridfs/private/downloader.hh b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/gridfs/downloader.hh similarity index 97% rename from src/mongocxx/lib/mongocxx/v_noabi/mongocxx/gridfs/private/downloader.hh rename to src/mongocxx/lib/mongocxx/v_noabi/mongocxx/gridfs/downloader.hh index 01959bb3b4..9b9bf2e2d9 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/gridfs/private/downloader.hh +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/gridfs/downloader.hh @@ -14,14 +14,15 @@ #pragma once +#include + +// + #include #include #include #include -#include - -#include namespace mongocxx { namespace v_noabi { @@ -116,5 +117,3 @@ class downloader::impl { } // namespace gridfs } // namespace v_noabi } // namespace mongocxx - -#include diff --git a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/gridfs/uploader.cpp b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/gridfs/uploader.cpp index d8127033c6..0f97933fdd 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/gridfs/uploader.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/gridfs/uploader.cpp @@ -12,6 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. +#include + +// + #include #include #include @@ -24,10 +28,6 @@ #include #include #include -#include -#include - -#include namespace { diff --git a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/gridfs/private/uploader.hh b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/gridfs/uploader.hh similarity index 96% rename from src/mongocxx/lib/mongocxx/v_noabi/mongocxx/gridfs/private/uploader.hh rename to src/mongocxx/lib/mongocxx/v_noabi/mongocxx/gridfs/uploader.hh index b29a09f1e2..248cdbbfa9 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/gridfs/private/uploader.hh +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/gridfs/uploader.hh @@ -14,15 +14,16 @@ #pragma once +#include + +// + #include #include -#include #include -#include - -#include +#include namespace mongocxx { namespace v_noabi { @@ -90,5 +91,3 @@ class uploader::impl { } // namespace gridfs } // namespace v_noabi } // namespace mongocxx - -#include diff --git a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/hint.cpp b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/hint.cpp index 2aac5c6013..ec0d2e99e3 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/hint.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/hint.cpp @@ -18,8 +18,6 @@ #include -#include - using bsoncxx::v_noabi::builder::concatenate; using bsoncxx::v_noabi::builder::basic::kvp; using bsoncxx::v_noabi::builder::basic::sub_document; diff --git a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/index_model.cpp b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/index_model.cpp index 75e4a65f80..9b91f3effd 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/index_model.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/index_model.cpp @@ -14,8 +14,6 @@ #include -#include - namespace mongocxx { namespace v_noabi { diff --git a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/index_view.cpp b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/index_view.cpp index 31d91f53af..e4ca7b3ac7 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/index_view.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/index_view.cpp @@ -12,16 +12,16 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include #include #include -#include #include #include -#include -#include +#include + +#include +#include namespace mongocxx { namespace v_noabi { diff --git a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/instance.cpp b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/instance.cpp index 233a11699a..dff56735a1 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/instance.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/instance.cpp @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +#include #include #include @@ -19,15 +20,15 @@ #include #include -#include - #include #include #include #include -#include -#include +#include + +#include +#include #if !defined(__has_feature) #define __has_feature(x) 0 diff --git a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/logger.cpp b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/logger.cpp index c6fab67c06..69fbc72912 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/logger.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/logger.cpp @@ -14,8 +14,6 @@ #include -#include - namespace mongocxx { namespace v_noabi { diff --git a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/model/delete_many.cpp b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/model/delete_many.cpp index c28a0df4e2..bae9ec2a88 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/model/delete_many.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/model/delete_many.cpp @@ -14,8 +14,6 @@ #include -#include - namespace mongocxx { namespace v_noabi { namespace model { diff --git a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/model/delete_one.cpp b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/model/delete_one.cpp index 464c2438cd..fa7a975a95 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/model/delete_one.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/model/delete_one.cpp @@ -14,8 +14,6 @@ #include -#include - namespace mongocxx { namespace v_noabi { namespace model { diff --git a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/model/insert_one.cpp b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/model/insert_one.cpp index 8f52f8d406..35279ec55b 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/model/insert_one.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/model/insert_one.cpp @@ -14,8 +14,6 @@ #include -#include - namespace mongocxx { namespace v_noabi { namespace model { diff --git a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/model/replace_one.cpp b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/model/replace_one.cpp index c20f699f45..40757bfb22 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/model/replace_one.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/model/replace_one.cpp @@ -14,8 +14,6 @@ #include -#include - namespace mongocxx { namespace v_noabi { namespace model { diff --git a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/model/update_many.cpp b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/model/update_many.cpp index 32d612ca0a..3d83849f2e 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/model/update_many.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/model/update_many.cpp @@ -16,8 +16,6 @@ #include -#include - namespace mongocxx { namespace v_noabi { namespace model { diff --git a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/model/update_one.cpp b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/model/update_one.cpp index ab0c6d8791..8721dd9425 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/model/update_one.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/model/update_one.cpp @@ -16,8 +16,6 @@ #include -#include - namespace mongocxx { namespace v_noabi { namespace model { diff --git a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/model/write.cpp b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/model/write.cpp index b8ec8d3247..d2f08f81e8 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/model/write.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/model/write.cpp @@ -16,8 +16,6 @@ #include -#include - namespace mongocxx { namespace v_noabi { namespace model { diff --git a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/aggregate.cpp b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/aggregate.cpp index 4eaa0fa53f..a5f8b61b0a 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/aggregate.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/aggregate.cpp @@ -15,11 +15,10 @@ #include #include + #include #include -#include - namespace mongocxx { namespace v_noabi { namespace options { diff --git a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/apm.cpp b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/apm.cpp index d618ae9aa7..7c50860e7a 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/apm.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/apm.cpp @@ -14,7 +14,9 @@ #include -#include +// + +#include namespace mongocxx { namespace v_noabi { diff --git a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/private/apm.hh b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/apm.hh similarity index 98% rename from src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/private/apm.hh rename to src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/apm.hh index b8aed4fc01..eb8f853b29 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/private/apm.hh +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/apm.hh @@ -14,12 +14,13 @@ #pragma once -#include - #include -#include -#include +// + +#include + +#include namespace mongocxx { namespace v_noabi { @@ -168,5 +169,3 @@ inline apm_unique_callbacks make_apm_callbacks(apm const& apm_opts) { } // namespace options } // namespace v_noabi } // namespace mongocxx - -#include diff --git a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/auto_encryption.cpp b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/auto_encryption.cpp index 06f4c9e8c8..64cc392adb 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/auto_encryption.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/auto_encryption.cpp @@ -17,13 +17,12 @@ #include #include #include + +#include #include -#include -#include +#include #include -#include - namespace mongocxx { namespace v_noabi { namespace options { diff --git a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/bulk_write.cpp b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/bulk_write.cpp index 54c35e23af..5596a055ca 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/bulk_write.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/bulk_write.cpp @@ -14,8 +14,6 @@ #include -#include - namespace mongocxx { namespace v_noabi { namespace options { diff --git a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/change_stream.cpp b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/change_stream.cpp index 6bcc666ce3..795f0832e2 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/change_stream.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/change_stream.cpp @@ -22,8 +22,6 @@ #include #include -#include - namespace mongocxx { namespace v_noabi { namespace options { diff --git a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/client.cpp b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/client.cpp index 51060e0fa7..4b08ea0aa7 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/client.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/client.cpp @@ -14,8 +14,6 @@ #include -#include - namespace mongocxx { namespace v_noabi { namespace options { diff --git a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/client_encryption.cpp b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/client_encryption.cpp index b6d0c62385..a0e9d735a3 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/client_encryption.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/client_encryption.cpp @@ -14,11 +14,10 @@ #include #include -#include -#include -#include -#include +#include +#include +#include namespace mongocxx { namespace v_noabi { diff --git a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/client_session.cpp b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/client_session.cpp index 8837cfdc2c..cf3b389ac3 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/client_session.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/client_session.cpp @@ -14,8 +14,6 @@ #include -#include - namespace mongocxx { namespace v_noabi { namespace options { diff --git a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/count.cpp b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/count.cpp index 214fa2e4da..ac41f7fdc2 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/count.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/count.cpp @@ -13,9 +13,8 @@ // limitations under the License. #include -#include -#include +#include namespace mongocxx { namespace v_noabi { diff --git a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/data_key.cpp b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/data_key.cpp index f85a212e34..ea95c44153 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/data_key.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/data_key.cpp @@ -13,10 +13,9 @@ // limitations under the License. #include -#include -#include -#include +#include +#include namespace mongocxx { namespace v_noabi { diff --git a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/delete.cpp b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/delete.cpp index b2bc4220fd..4f91f62af6 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/delete.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/delete.cpp @@ -15,8 +15,6 @@ #include #include -#include - namespace mongocxx { namespace v_noabi { namespace options { diff --git a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/distinct.cpp b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/distinct.cpp index c25eadb10d..1ce5e96fbe 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/distinct.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/distinct.cpp @@ -13,9 +13,8 @@ // limitations under the License. #include -#include -#include +#include namespace mongocxx { namespace v_noabi { diff --git a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/encrypt.cpp b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/encrypt.cpp index 9fe5d4ec0f..b686419e81 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/encrypt.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/encrypt.cpp @@ -14,16 +14,15 @@ #include -#include - #include #include #include -#include -#include -#include -#include +#include + +#include +#include +#include namespace mongocxx { namespace v_noabi { diff --git a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/estimated_document_count.cpp b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/estimated_document_count.cpp index 8b6953e73f..91099b72a9 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/estimated_document_count.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/estimated_document_count.cpp @@ -13,9 +13,8 @@ // limitations under the License. #include -#include -#include +#include namespace mongocxx { namespace v_noabi { diff --git a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/find.cpp b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/find.cpp index c1c1a1e038..08f0f701e3 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/find.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/find.cpp @@ -13,9 +13,8 @@ // limitations under the License. #include -#include -#include +#include namespace mongocxx { namespace v_noabi { diff --git a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/find_one_and_delete.cpp b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/find_one_and_delete.cpp index 33348d0edb..6c77cf335e 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/find_one_and_delete.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/find_one_and_delete.cpp @@ -14,8 +14,6 @@ #include -#include - namespace mongocxx { namespace v_noabi { namespace options { diff --git a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/find_one_and_replace.cpp b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/find_one_and_replace.cpp index 12d2e58232..2df73ab09a 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/find_one_and_replace.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/find_one_and_replace.cpp @@ -14,8 +14,6 @@ #include -#include - namespace mongocxx { namespace v_noabi { namespace options { diff --git a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/find_one_and_update.cpp b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/find_one_and_update.cpp index a6f0e1e182..a1c4b9021e 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/find_one_and_update.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/find_one_and_update.cpp @@ -16,8 +16,6 @@ #include -#include - namespace mongocxx { namespace v_noabi { namespace options { diff --git a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/gridfs/bucket.cpp b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/gridfs/bucket.cpp index 23f586cd52..7d46423d7f 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/gridfs/bucket.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/gridfs/bucket.cpp @@ -19,8 +19,6 @@ #include #include -#include - namespace mongocxx { namespace v_noabi { namespace options { diff --git a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/gridfs/upload.cpp b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/gridfs/upload.cpp index 44193053b9..00bf952a55 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/gridfs/upload.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/gridfs/upload.cpp @@ -16,8 +16,6 @@ #include -#include - namespace mongocxx { namespace v_noabi { namespace options { diff --git a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/index.cpp b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/index.cpp index 646a4b7bc2..2420130f33 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/index.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/index.cpp @@ -13,14 +13,14 @@ // limitations under the License. #include -#include #include #include #include -#include -#include +#include + +#include namespace mongocxx { namespace v_noabi { @@ -319,5 +319,3 @@ int index::wiredtiger_storage_options::type() const { } // namespace options } // namespace v_noabi } // namespace mongocxx - -#include diff --git a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/index_view.cpp b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/index_view.cpp index a69a00add7..2d4bf8aa1a 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/index_view.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/index_view.cpp @@ -18,8 +18,6 @@ #include -#include - using bsoncxx::v_noabi::builder::basic::kvp; using bsoncxx::v_noabi::builder::basic::make_document; diff --git a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/insert.cpp b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/insert.cpp index 5dab1b323f..47454b0a83 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/insert.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/insert.cpp @@ -14,8 +14,6 @@ #include -#include - namespace mongocxx { namespace v_noabi { namespace options { diff --git a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/pool.cpp b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/pool.cpp index eb5ab5ddc6..04c68f2d25 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/pool.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/pool.cpp @@ -14,8 +14,6 @@ #include -#include - namespace mongocxx { namespace v_noabi { namespace options { diff --git a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/range.cpp b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/range.cpp index 127c0c337d..0eab07c2af 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/range.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/range.cpp @@ -14,8 +14,6 @@ #include -#include - namespace mongocxx { namespace v_noabi { namespace options { diff --git a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/replace.cpp b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/replace.cpp index 8538b57b8a..5a42d66884 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/replace.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/replace.cpp @@ -16,8 +16,6 @@ #include -#include - namespace mongocxx { namespace v_noabi { namespace options { diff --git a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/rewrap_many_datakey.cpp b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/rewrap_many_datakey.cpp index de474b7ed3..7523bfbae0 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/rewrap_many_datakey.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/rewrap_many_datakey.cpp @@ -12,15 +12,14 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include - #include #include #include -#include -#include -#include +#include + +#include +#include namespace mongocxx { namespace v_noabi { diff --git a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/server_api.cpp b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/server_api.cpp index c0f4a5991b..934723033e 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/server_api.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/server_api.cpp @@ -12,16 +12,18 @@ // See the License for the specific language governing permissions and // limitations under the License. +#include + +// + #include #include #include #include -#include -#include -#include +#include namespace mongocxx { namespace v_noabi { diff --git a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/private/server_api.hh b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/server_api.hh similarity index 94% rename from src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/private/server_api.hh rename to src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/server_api.hh index 9a75b84f26..91b55e7f31 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/private/server_api.hh +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/server_api.hh @@ -14,13 +14,15 @@ #pragma once +#include + +// + #include #include #include -#include -#include -#include +#include namespace mongocxx { namespace v_noabi { @@ -59,5 +61,3 @@ inline unique_server_api make_server_api(server_api const& opts) { } // namespace options } // namespace v_noabi } // namespace mongocxx - -#include diff --git a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/tls.cpp b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/tls.cpp index 9eefbdc7bb..93050ba343 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/tls.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/tls.cpp @@ -14,8 +14,6 @@ #include -#include - namespace mongocxx { namespace v_noabi { namespace options { diff --git a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/private/ssl.hh b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/tls.hh similarity index 93% rename from src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/private/ssl.hh rename to src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/tls.hh index b4ead06506..0324d0a63b 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/private/ssl.hh +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/tls.hh @@ -14,12 +14,13 @@ #pragma once -#include - #include -#include -#include +// + +#include + +#include namespace mongocxx { namespace v_noabi { @@ -56,5 +57,3 @@ inline std::pair<::mongoc_ssl_opt_t, std::list diff --git a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/transaction.cpp b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/transaction.cpp index bbca2812a5..aa19b18110 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/transaction.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/transaction.cpp @@ -12,13 +12,14 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include +#include + +// #include #include -#include -#include +#include namespace mongocxx { namespace v_noabi { @@ -90,5 +91,3 @@ transaction::impl& transaction::_get_impl() { } // namespace options } // namespace v_noabi } // namespace mongocxx - -#include diff --git a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/private/transaction.hh b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/transaction.hh similarity index 98% rename from src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/private/transaction.hh rename to src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/transaction.hh index 3e6c8b89e8..c9c7d9aa80 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/private/transaction.hh +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/transaction.hh @@ -14,6 +14,10 @@ #pragma once +#include + +// + #include #include @@ -23,8 +27,6 @@ #include #include -#include - namespace mongocxx { namespace v_noabi { namespace options { @@ -130,5 +132,3 @@ class transaction::impl { } // namespace options } // namespace v_noabi } // namespace mongocxx - -#include diff --git a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/update.cpp b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/update.cpp index 016e105d01..2d7deeee8c 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/update.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/update.cpp @@ -17,8 +17,6 @@ #include -#include - namespace mongocxx { namespace v_noabi { namespace options { diff --git a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/pipeline.cpp b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/pipeline.cpp index 474449b290..83551aa913 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/pipeline.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/pipeline.cpp @@ -14,12 +14,12 @@ #include #include -#include #include -#include -#include +#include + +#include using bsoncxx::v_noabi::builder::basic::kvp; using bsoncxx::v_noabi::builder::basic::sub_document; diff --git a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/pool.cpp b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/pool.cpp index ed14353654..76d70b12a5 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/pool.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/pool.cpp @@ -14,23 +14,23 @@ #include -#include - #include #include #include #include -#include -#include -#include -#include #include + +#include +#include +#include + +#include + #include +#include #include #include -#include - namespace mongocxx { namespace v_noabi { diff --git a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/libmongoc.hh b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/libmongoc.hh deleted file mode 100644 index fc86e6083a..0000000000 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/libmongoc.hh +++ /dev/null @@ -1,87 +0,0 @@ -// Copyright 2009-present MongoDB, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#pragma once - -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wconversion" -#elif defined(__GNUC__) -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wconversion" -#elif (_MSC_VER) -// TODO: CXX-1366 Disable MSVC warnings for libmongoc -#endif - -#include - -#if defined(__clang__) -#pragma clang diagnostic pop -#elif defined(__GNUC__) -#pragma GCC diagnostic pop -#elif (_MSC_VER) -// TODO: CXX-1366 Disable MSVC warnings for libmongoc -#endif - -#include -#include - -#include - -namespace mongocxx { -namespace libmongoc { - -#ifdef MONGOCXX_TESTING - -#if defined(__GNUC__) && (__GNUC__ >= 6) && !defined(__clang__) -// See https://jira.mongodb.com/browse/CXX-1453 and -// https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81605 The basic issue -// is that GCC sees the visibility attributes on the mongoc functions, -// and considers them part of the type, and then emits a silly -// diagnostic stating that the attribute was ignored. -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wignored-attributes" -#endif - -#define MONGOCXX_LIBMONGOC_SYMBOL(name) \ - extern MONGOCXX_ABI_EXPORT_TESTING mongocxx::test_util::mock& name; -#include "libmongoc_symbols.hh" -#undef MONGOCXX_LIBMONGOC_SYMBOL - -// CDRIVER-5678 -using log_func_cdecl_t = void( - MONGOCXX_ABI_CDECL*)(mongoc_log_level_t log_level, char const* log_domain, char const* message, void* user_data); -using log_set_handler_cdecl_t = void(MONGOCXX_ABI_CDECL*)(log_func_cdecl_t log_func, void* user_data); - -extern MONGOCXX_ABI_EXPORT_TESTING mongocxx::test_util::mock& log_set_handler; - -#if defined(__GNUC__) && (__GNUC__ >= 6) && !defined(__clang__) -#pragma GCC diagnostic pop -#endif - -#else - -#define MONGOCXX_LIBMONGOC_SYMBOL(name) constexpr auto name = mongoc_##name; -#include "libmongoc_symbols.hh" -#undef MONGOCXX_LIBMONGOC_SYMBOL - -// CDRIVER-5678 -constexpr auto log_set_handler = mongoc_log_set_handler; - -#endif - -} // namespace libmongoc -} // namespace mongocxx - -#include diff --git a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/libmongoc_symbols.hh b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/libmongoc_symbols.hh deleted file mode 100644 index e4d322f923..0000000000 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/libmongoc_symbols.hh +++ /dev/null @@ -1,378 +0,0 @@ -// Copyright 2009-present MongoDB, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#include - -MONGOCXX_LIBMONGOC_SYMBOL(apm_callbacks_destroy) -MONGOCXX_LIBMONGOC_SYMBOL(apm_callbacks_new) -MONGOCXX_LIBMONGOC_SYMBOL(apm_command_failed_get_command_name) -MONGOCXX_LIBMONGOC_SYMBOL(apm_command_failed_get_context) -MONGOCXX_LIBMONGOC_SYMBOL(apm_command_failed_get_duration) -MONGOCXX_LIBMONGOC_SYMBOL(apm_command_failed_get_error) -MONGOCXX_LIBMONGOC_SYMBOL(apm_command_failed_get_host) -MONGOCXX_LIBMONGOC_SYMBOL(apm_command_failed_get_operation_id) -MONGOCXX_LIBMONGOC_SYMBOL(apm_command_failed_get_reply) -MONGOCXX_LIBMONGOC_SYMBOL(apm_command_failed_get_request_id) -MONGOCXX_LIBMONGOC_SYMBOL(apm_command_failed_get_server_id) -MONGOCXX_LIBMONGOC_SYMBOL(apm_command_failed_get_service_id) -MONGOCXX_LIBMONGOC_SYMBOL(apm_command_started_get_command) -MONGOCXX_LIBMONGOC_SYMBOL(apm_command_started_get_command_name) -MONGOCXX_LIBMONGOC_SYMBOL(apm_command_started_get_context) -MONGOCXX_LIBMONGOC_SYMBOL(apm_command_started_get_database_name) -MONGOCXX_LIBMONGOC_SYMBOL(apm_command_started_get_host) -MONGOCXX_LIBMONGOC_SYMBOL(apm_command_started_get_operation_id) -MONGOCXX_LIBMONGOC_SYMBOL(apm_command_started_get_request_id) -MONGOCXX_LIBMONGOC_SYMBOL(apm_command_started_get_server_id) -MONGOCXX_LIBMONGOC_SYMBOL(apm_command_started_get_service_id) -MONGOCXX_LIBMONGOC_SYMBOL(apm_command_succeeded_get_command_name) -MONGOCXX_LIBMONGOC_SYMBOL(apm_command_succeeded_get_context) -MONGOCXX_LIBMONGOC_SYMBOL(apm_command_succeeded_get_duration) -MONGOCXX_LIBMONGOC_SYMBOL(apm_command_succeeded_get_host) -MONGOCXX_LIBMONGOC_SYMBOL(apm_command_succeeded_get_operation_id) -MONGOCXX_LIBMONGOC_SYMBOL(apm_command_succeeded_get_reply) -MONGOCXX_LIBMONGOC_SYMBOL(apm_command_succeeded_get_request_id) -MONGOCXX_LIBMONGOC_SYMBOL(apm_command_succeeded_get_server_id) -MONGOCXX_LIBMONGOC_SYMBOL(apm_command_succeeded_get_service_id) -MONGOCXX_LIBMONGOC_SYMBOL(apm_server_changed_get_context) -MONGOCXX_LIBMONGOC_SYMBOL(apm_server_changed_get_host) -MONGOCXX_LIBMONGOC_SYMBOL(apm_server_changed_get_new_description) -MONGOCXX_LIBMONGOC_SYMBOL(apm_server_changed_get_previous_description) -MONGOCXX_LIBMONGOC_SYMBOL(apm_server_changed_get_topology_id) -MONGOCXX_LIBMONGOC_SYMBOL(apm_server_closed_get_context) -MONGOCXX_LIBMONGOC_SYMBOL(apm_server_closed_get_host) -MONGOCXX_LIBMONGOC_SYMBOL(apm_server_closed_get_topology_id) -MONGOCXX_LIBMONGOC_SYMBOL(apm_server_heartbeat_failed_get_awaited) -MONGOCXX_LIBMONGOC_SYMBOL(apm_server_heartbeat_failed_get_context) -MONGOCXX_LIBMONGOC_SYMBOL(apm_server_heartbeat_failed_get_duration) -MONGOCXX_LIBMONGOC_SYMBOL(apm_server_heartbeat_failed_get_error) -MONGOCXX_LIBMONGOC_SYMBOL(apm_server_heartbeat_failed_get_host) -MONGOCXX_LIBMONGOC_SYMBOL(apm_server_heartbeat_started_get_awaited) -MONGOCXX_LIBMONGOC_SYMBOL(apm_server_heartbeat_started_get_context) -MONGOCXX_LIBMONGOC_SYMBOL(apm_server_heartbeat_started_get_host) -MONGOCXX_LIBMONGOC_SYMBOL(apm_server_heartbeat_succeeded_get_awaited) -MONGOCXX_LIBMONGOC_SYMBOL(apm_server_heartbeat_succeeded_get_context) -MONGOCXX_LIBMONGOC_SYMBOL(apm_server_heartbeat_succeeded_get_duration) -MONGOCXX_LIBMONGOC_SYMBOL(apm_server_heartbeat_succeeded_get_host) -MONGOCXX_LIBMONGOC_SYMBOL(apm_server_heartbeat_succeeded_get_reply) -MONGOCXX_LIBMONGOC_SYMBOL(apm_server_opening_get_context) -MONGOCXX_LIBMONGOC_SYMBOL(apm_server_opening_get_host) -MONGOCXX_LIBMONGOC_SYMBOL(apm_server_opening_get_topology_id) -MONGOCXX_LIBMONGOC_SYMBOL(apm_set_command_failed_cb) -MONGOCXX_LIBMONGOC_SYMBOL(apm_set_command_started_cb) -MONGOCXX_LIBMONGOC_SYMBOL(apm_set_command_succeeded_cb) -MONGOCXX_LIBMONGOC_SYMBOL(apm_set_server_changed_cb) -MONGOCXX_LIBMONGOC_SYMBOL(apm_set_server_closed_cb) -MONGOCXX_LIBMONGOC_SYMBOL(apm_set_server_heartbeat_failed_cb) -MONGOCXX_LIBMONGOC_SYMBOL(apm_set_server_heartbeat_started_cb) -MONGOCXX_LIBMONGOC_SYMBOL(apm_set_server_heartbeat_succeeded_cb) -MONGOCXX_LIBMONGOC_SYMBOL(apm_set_server_opening_cb) -MONGOCXX_LIBMONGOC_SYMBOL(apm_set_topology_changed_cb) -MONGOCXX_LIBMONGOC_SYMBOL(apm_set_topology_closed_cb) -MONGOCXX_LIBMONGOC_SYMBOL(apm_set_topology_opening_cb) -MONGOCXX_LIBMONGOC_SYMBOL(apm_topology_changed_get_context) -MONGOCXX_LIBMONGOC_SYMBOL(apm_topology_changed_get_new_description) -MONGOCXX_LIBMONGOC_SYMBOL(apm_topology_changed_get_previous_description) -MONGOCXX_LIBMONGOC_SYMBOL(apm_topology_changed_get_topology_id) -MONGOCXX_LIBMONGOC_SYMBOL(apm_topology_closed_get_context) -MONGOCXX_LIBMONGOC_SYMBOL(apm_topology_closed_get_topology_id) -MONGOCXX_LIBMONGOC_SYMBOL(apm_topology_opening_get_context) -MONGOCXX_LIBMONGOC_SYMBOL(apm_topology_opening_get_topology_id) -MONGOCXX_LIBMONGOC_SYMBOL(auto_encryption_opts_destroy) -MONGOCXX_LIBMONGOC_SYMBOL(auto_encryption_opts_new) -MONGOCXX_LIBMONGOC_SYMBOL(auto_encryption_opts_set_bypass_auto_encryption) -MONGOCXX_LIBMONGOC_SYMBOL(auto_encryption_opts_set_bypass_query_analysis) -MONGOCXX_LIBMONGOC_SYMBOL(auto_encryption_opts_set_encrypted_fields_map) -MONGOCXX_LIBMONGOC_SYMBOL(auto_encryption_opts_set_extra) -MONGOCXX_LIBMONGOC_SYMBOL(auto_encryption_opts_set_keyvault_client) -MONGOCXX_LIBMONGOC_SYMBOL(auto_encryption_opts_set_keyvault_client_pool) -MONGOCXX_LIBMONGOC_SYMBOL(auto_encryption_opts_set_keyvault_namespace) -MONGOCXX_LIBMONGOC_SYMBOL(auto_encryption_opts_set_kms_providers) -MONGOCXX_LIBMONGOC_SYMBOL(auto_encryption_opts_set_schema_map) -MONGOCXX_LIBMONGOC_SYMBOL(auto_encryption_opts_set_tls_opts) -MONGOCXX_LIBMONGOC_SYMBOL(bulk_operation_destroy) -MONGOCXX_LIBMONGOC_SYMBOL(bulk_operation_execute) -MONGOCXX_LIBMONGOC_SYMBOL(bulk_operation_get_write_concern) -MONGOCXX_LIBMONGOC_SYMBOL(bulk_operation_insert_with_opts) -MONGOCXX_LIBMONGOC_SYMBOL(bulk_operation_new) -MONGOCXX_LIBMONGOC_SYMBOL(bulk_operation_remove_many_with_opts) -MONGOCXX_LIBMONGOC_SYMBOL(bulk_operation_remove_one_with_opts) -MONGOCXX_LIBMONGOC_SYMBOL(bulk_operation_replace_one_with_opts) -MONGOCXX_LIBMONGOC_SYMBOL(bulk_operation_set_bypass_document_validation) -MONGOCXX_LIBMONGOC_SYMBOL(bulk_operation_set_client) -MONGOCXX_LIBMONGOC_SYMBOL(bulk_operation_set_client_session) -MONGOCXX_LIBMONGOC_SYMBOL(bulk_operation_set_collection) -MONGOCXX_LIBMONGOC_SYMBOL(bulk_operation_set_database) -MONGOCXX_LIBMONGOC_SYMBOL(bulk_operation_set_write_concern) -MONGOCXX_LIBMONGOC_SYMBOL(bulk_operation_update_many_with_opts) -MONGOCXX_LIBMONGOC_SYMBOL(bulk_operation_update_one_with_opts) -MONGOCXX_LIBMONGOC_SYMBOL(change_stream_destroy) -MONGOCXX_LIBMONGOC_SYMBOL(change_stream_error_document) -MONGOCXX_LIBMONGOC_SYMBOL(change_stream_get_resume_token) -MONGOCXX_LIBMONGOC_SYMBOL(change_stream_next) -MONGOCXX_LIBMONGOC_SYMBOL(cleanup) -MONGOCXX_LIBMONGOC_SYMBOL(client_command_simple_with_server_id) -MONGOCXX_LIBMONGOC_SYMBOL(client_destroy) -MONGOCXX_LIBMONGOC_SYMBOL(client_enable_auto_encryption) -MONGOCXX_LIBMONGOC_SYMBOL(client_encryption_add_key_alt_name) -MONGOCXX_LIBMONGOC_SYMBOL(client_encryption_create_datakey) -MONGOCXX_LIBMONGOC_SYMBOL(client_encryption_create_encrypted_collection) -MONGOCXX_LIBMONGOC_SYMBOL(client_encryption_datakey_opts_destroy) -MONGOCXX_LIBMONGOC_SYMBOL(client_encryption_datakey_opts_new) -MONGOCXX_LIBMONGOC_SYMBOL(client_encryption_datakey_opts_set_keyaltnames) -MONGOCXX_LIBMONGOC_SYMBOL(client_encryption_datakey_opts_set_keymaterial) -MONGOCXX_LIBMONGOC_SYMBOL(client_encryption_datakey_opts_set_masterkey) -MONGOCXX_LIBMONGOC_SYMBOL(client_encryption_decrypt) -MONGOCXX_LIBMONGOC_SYMBOL(client_encryption_delete_key) -MONGOCXX_LIBMONGOC_SYMBOL(client_encryption_destroy) -MONGOCXX_LIBMONGOC_SYMBOL(client_encryption_encrypt) -MONGOCXX_LIBMONGOC_SYMBOL(client_encryption_encrypt_expression) -MONGOCXX_LIBMONGOC_SYMBOL(client_encryption_encrypt_opts_destroy) -MONGOCXX_LIBMONGOC_SYMBOL(client_encryption_encrypt_opts_new) -MONGOCXX_LIBMONGOC_SYMBOL(client_encryption_encrypt_opts_set_algorithm) -MONGOCXX_LIBMONGOC_SYMBOL(client_encryption_encrypt_opts_set_contention_factor) -MONGOCXX_LIBMONGOC_SYMBOL(client_encryption_encrypt_opts_set_keyaltname) -MONGOCXX_LIBMONGOC_SYMBOL(client_encryption_encrypt_opts_set_keyid) -MONGOCXX_LIBMONGOC_SYMBOL(client_encryption_encrypt_opts_set_query_type) -MONGOCXX_LIBMONGOC_SYMBOL(client_encryption_encrypt_opts_set_range_opts) -MONGOCXX_LIBMONGOC_SYMBOL(client_encryption_encrypt_range_opts_destroy) -MONGOCXX_LIBMONGOC_SYMBOL(client_encryption_encrypt_range_opts_new) -MONGOCXX_LIBMONGOC_SYMBOL(client_encryption_encrypt_range_opts_set_min) -MONGOCXX_LIBMONGOC_SYMBOL(client_encryption_encrypt_range_opts_set_max) -MONGOCXX_LIBMONGOC_SYMBOL(client_encryption_encrypt_range_opts_set_precision) -MONGOCXX_LIBMONGOC_SYMBOL(client_encryption_encrypt_range_opts_set_sparsity) -MONGOCXX_LIBMONGOC_SYMBOL(client_encryption_encrypt_range_opts_set_trim_factor) -MONGOCXX_LIBMONGOC_SYMBOL(client_encryption_get_key) -MONGOCXX_LIBMONGOC_SYMBOL(client_encryption_get_key_by_alt_name) -MONGOCXX_LIBMONGOC_SYMBOL(client_encryption_get_keys) -MONGOCXX_LIBMONGOC_SYMBOL(client_encryption_opts_destroy) -MONGOCXX_LIBMONGOC_SYMBOL(client_encryption_opts_new) -MONGOCXX_LIBMONGOC_SYMBOL(client_encryption_opts_set_keyvault_client) -MONGOCXX_LIBMONGOC_SYMBOL(client_encryption_opts_set_keyvault_namespace) -MONGOCXX_LIBMONGOC_SYMBOL(client_encryption_opts_set_kms_providers) -MONGOCXX_LIBMONGOC_SYMBOL(client_encryption_opts_set_tls_opts) -MONGOCXX_LIBMONGOC_SYMBOL(client_encryption_new) -MONGOCXX_LIBMONGOC_SYMBOL(client_encryption_remove_key_alt_name) -MONGOCXX_LIBMONGOC_SYMBOL(client_encryption_rewrap_many_datakey) -MONGOCXX_LIBMONGOC_SYMBOL(client_encryption_rewrap_many_datakey_result_get_bulk_write_result) -MONGOCXX_LIBMONGOC_SYMBOL(client_encryption_rewrap_many_datakey_result_destroy) -MONGOCXX_LIBMONGOC_SYMBOL(client_encryption_rewrap_many_datakey_result_new) -MONGOCXX_LIBMONGOC_SYMBOL(client_find_databases_with_opts) -MONGOCXX_LIBMONGOC_SYMBOL(client_get_collection) -MONGOCXX_LIBMONGOC_SYMBOL(client_get_database) -MONGOCXX_LIBMONGOC_SYMBOL(client_get_database_names_with_opts) -MONGOCXX_LIBMONGOC_SYMBOL(client_get_read_concern) -MONGOCXX_LIBMONGOC_SYMBOL(client_get_read_prefs) -MONGOCXX_LIBMONGOC_SYMBOL(client_get_uri) -MONGOCXX_LIBMONGOC_SYMBOL(client_get_write_concern) -MONGOCXX_LIBMONGOC_SYMBOL(client_new_from_uri) -MONGOCXX_LIBMONGOC_SYMBOL(client_pool_enable_auto_encryption) -MONGOCXX_LIBMONGOC_SYMBOL(client_pool_destroy) -MONGOCXX_LIBMONGOC_SYMBOL(client_pool_new) -MONGOCXX_LIBMONGOC_SYMBOL(client_pool_new_with_error) -MONGOCXX_LIBMONGOC_SYMBOL(client_pool_pop) -MONGOCXX_LIBMONGOC_SYMBOL(client_pool_push) -MONGOCXX_LIBMONGOC_SYMBOL(client_pool_set_apm_callbacks) -MONGOCXX_LIBMONGOC_SYMBOL(client_pool_set_server_api) -MONGOCXX_LIBMONGOC_SYMBOL(client_pool_try_pop) -MONGOCXX_LIBMONGOC_SYMBOL(client_reset) -MONGOCXX_LIBMONGOC_SYMBOL(client_select_server) -MONGOCXX_LIBMONGOC_SYMBOL(client_session_abort_transaction) -MONGOCXX_LIBMONGOC_SYMBOL(client_session_advance_cluster_time) -MONGOCXX_LIBMONGOC_SYMBOL(client_session_advance_operation_time) -MONGOCXX_LIBMONGOC_SYMBOL(client_session_append) -MONGOCXX_LIBMONGOC_SYMBOL(client_session_commit_transaction) -MONGOCXX_LIBMONGOC_SYMBOL(client_session_destroy) -MONGOCXX_LIBMONGOC_SYMBOL(client_session_get_cluster_time) -MONGOCXX_LIBMONGOC_SYMBOL(client_session_get_lsid) -MONGOCXX_LIBMONGOC_SYMBOL(client_session_get_operation_time) -MONGOCXX_LIBMONGOC_SYMBOL(client_session_get_opts) -MONGOCXX_LIBMONGOC_SYMBOL(client_session_get_server_id) -MONGOCXX_LIBMONGOC_SYMBOL(client_session_get_transaction_state) -MONGOCXX_LIBMONGOC_SYMBOL(client_session_get_dirty) -MONGOCXX_LIBMONGOC_SYMBOL(client_session_in_transaction) -MONGOCXX_LIBMONGOC_SYMBOL(client_session_start_transaction) -MONGOCXX_LIBMONGOC_SYMBOL(client_session_with_transaction) -MONGOCXX_LIBMONGOC_SYMBOL(client_set_apm_callbacks) -MONGOCXX_LIBMONGOC_SYMBOL(client_set_read_concern) -MONGOCXX_LIBMONGOC_SYMBOL(client_set_read_prefs) -MONGOCXX_LIBMONGOC_SYMBOL(client_set_write_concern) -MONGOCXX_LIBMONGOC_SYMBOL(client_set_server_api) -MONGOCXX_LIBMONGOC_SYMBOL(client_start_session) -MONGOCXX_LIBMONGOC_SYMBOL(client_watch) -MONGOCXX_LIBMONGOC_SYMBOL(collection_aggregate) -MONGOCXX_LIBMONGOC_SYMBOL(collection_command_simple) -MONGOCXX_LIBMONGOC_SYMBOL(collection_copy) -// Remove these suppressions when CXX-1594 is done. -BSONCXX_SUPPRESS_DEPRECATION_WARNINGS_BEGIN -MONGOCXX_LIBMONGOC_SYMBOL(collection_count_with_opts) -BSONCXX_SUPPRESS_DEPRECATION_WARNINGS_END -MONGOCXX_LIBMONGOC_SYMBOL(collection_count_documents) -MONGOCXX_LIBMONGOC_SYMBOL(collection_create_bulk_operation_with_opts) -MONGOCXX_LIBMONGOC_SYMBOL(collection_destroy) -MONGOCXX_LIBMONGOC_SYMBOL(collection_drop) -MONGOCXX_LIBMONGOC_SYMBOL(collection_drop_index) -MONGOCXX_LIBMONGOC_SYMBOL(collection_drop_with_opts) -MONGOCXX_LIBMONGOC_SYMBOL(collection_estimated_document_count) -MONGOCXX_LIBMONGOC_SYMBOL(collection_find_and_modify_with_opts) -MONGOCXX_LIBMONGOC_SYMBOL(collection_find_indexes_with_opts) -MONGOCXX_LIBMONGOC_SYMBOL(collection_find_with_opts) -MONGOCXX_LIBMONGOC_SYMBOL(collection_get_name) -MONGOCXX_LIBMONGOC_SYMBOL(collection_get_read_concern) -MONGOCXX_LIBMONGOC_SYMBOL(collection_get_read_prefs) -MONGOCXX_LIBMONGOC_SYMBOL(collection_get_write_concern) -MONGOCXX_LIBMONGOC_SYMBOL(collection_keys_to_index_string) -MONGOCXX_LIBMONGOC_SYMBOL(collection_read_command_with_opts) -MONGOCXX_LIBMONGOC_SYMBOL(collection_rename) -MONGOCXX_LIBMONGOC_SYMBOL(collection_rename_with_opts) -MONGOCXX_LIBMONGOC_SYMBOL(collection_set_read_concern) -MONGOCXX_LIBMONGOC_SYMBOL(collection_set_read_prefs) -MONGOCXX_LIBMONGOC_SYMBOL(collection_set_write_concern) -MONGOCXX_LIBMONGOC_SYMBOL(collection_watch) -MONGOCXX_LIBMONGOC_SYMBOL(collection_write_command_with_opts) -MONGOCXX_LIBMONGOC_SYMBOL(cursor_destroy) -MONGOCXX_LIBMONGOC_SYMBOL(cursor_error) -MONGOCXX_LIBMONGOC_SYMBOL(cursor_error_document) -MONGOCXX_LIBMONGOC_SYMBOL(cursor_new_from_command_reply_with_opts) -MONGOCXX_LIBMONGOC_SYMBOL(cursor_next) -MONGOCXX_LIBMONGOC_SYMBOL(cursor_set_max_await_time_ms) -MONGOCXX_LIBMONGOC_SYMBOL(database_aggregate) -MONGOCXX_LIBMONGOC_SYMBOL(database_command_with_opts) -MONGOCXX_LIBMONGOC_SYMBOL(database_copy) -MONGOCXX_LIBMONGOC_SYMBOL(database_create_collection) -MONGOCXX_LIBMONGOC_SYMBOL(database_destroy) -MONGOCXX_LIBMONGOC_SYMBOL(database_drop) -MONGOCXX_LIBMONGOC_SYMBOL(database_drop_with_opts) -MONGOCXX_LIBMONGOC_SYMBOL(database_find_collections_with_opts) -MONGOCXX_LIBMONGOC_SYMBOL(database_get_collection_names_with_opts) -MONGOCXX_LIBMONGOC_SYMBOL(database_get_collection) -MONGOCXX_LIBMONGOC_SYMBOL(database_get_read_concern) -MONGOCXX_LIBMONGOC_SYMBOL(database_get_read_prefs) -MONGOCXX_LIBMONGOC_SYMBOL(database_get_write_concern) -MONGOCXX_LIBMONGOC_SYMBOL(database_has_collection) -MONGOCXX_LIBMONGOC_SYMBOL(database_set_read_concern) -MONGOCXX_LIBMONGOC_SYMBOL(database_set_read_prefs) -MONGOCXX_LIBMONGOC_SYMBOL(database_set_write_concern) -MONGOCXX_LIBMONGOC_SYMBOL(database_watch) -MONGOCXX_LIBMONGOC_SYMBOL(error_has_label) -MONGOCXX_LIBMONGOC_SYMBOL(find_and_modify_opts_append) -MONGOCXX_LIBMONGOC_SYMBOL(find_and_modify_opts_destroy) -MONGOCXX_LIBMONGOC_SYMBOL(find_and_modify_opts_new) -MONGOCXX_LIBMONGOC_SYMBOL(find_and_modify_opts_set_bypass_document_validation) -MONGOCXX_LIBMONGOC_SYMBOL(find_and_modify_opts_set_fields) -MONGOCXX_LIBMONGOC_SYMBOL(find_and_modify_opts_set_flags) -MONGOCXX_LIBMONGOC_SYMBOL(find_and_modify_opts_set_max_time_ms) -MONGOCXX_LIBMONGOC_SYMBOL(find_and_modify_opts_set_sort) -MONGOCXX_LIBMONGOC_SYMBOL(find_and_modify_opts_set_update) -MONGOCXX_LIBMONGOC_SYMBOL(handshake_data_append) -MONGOCXX_LIBMONGOC_SYMBOL(index_opt_geo_init) -MONGOCXX_LIBMONGOC_SYMBOL(index_opt_init) -MONGOCXX_LIBMONGOC_SYMBOL(index_opt_wt_init) -MONGOCXX_LIBMONGOC_SYMBOL(init) -// MONGOCXX_LIBMONGOC_SYMBOL(log_set_handler) // CDRIVER-5678: not __cdecl. -MONGOCXX_LIBMONGOC_SYMBOL(read_concern_copy) -MONGOCXX_LIBMONGOC_SYMBOL(read_concern_destroy) -MONGOCXX_LIBMONGOC_SYMBOL(read_concern_get_level) -MONGOCXX_LIBMONGOC_SYMBOL(read_concern_new) -MONGOCXX_LIBMONGOC_SYMBOL(read_concern_set_level) -MONGOCXX_LIBMONGOC_SYMBOL(read_prefs_copy) -MONGOCXX_LIBMONGOC_SYMBOL(read_prefs_destroy) -MONGOCXX_LIBMONGOC_SYMBOL(read_prefs_get_hedge) -MONGOCXX_LIBMONGOC_SYMBOL(read_prefs_get_max_staleness_seconds) -MONGOCXX_LIBMONGOC_SYMBOL(read_prefs_get_mode) -MONGOCXX_LIBMONGOC_SYMBOL(read_prefs_get_tags) -MONGOCXX_LIBMONGOC_SYMBOL(read_prefs_new) -MONGOCXX_LIBMONGOC_SYMBOL(read_prefs_set_hedge) -MONGOCXX_LIBMONGOC_SYMBOL(read_prefs_set_max_staleness_seconds) -MONGOCXX_LIBMONGOC_SYMBOL(read_prefs_set_mode) -MONGOCXX_LIBMONGOC_SYMBOL(read_prefs_set_tags) -MONGOCXX_LIBMONGOC_SYMBOL(server_api_version_to_string) -MONGOCXX_LIBMONGOC_SYMBOL(server_api_version_from_string) -MONGOCXX_LIBMONGOC_SYMBOL(server_api_new) -MONGOCXX_LIBMONGOC_SYMBOL(server_api_copy) -MONGOCXX_LIBMONGOC_SYMBOL(server_api_destroy) -MONGOCXX_LIBMONGOC_SYMBOL(server_api_strict) -MONGOCXX_LIBMONGOC_SYMBOL(server_api_deprecation_errors) -MONGOCXX_LIBMONGOC_SYMBOL(server_api_get_deprecation_errors) -MONGOCXX_LIBMONGOC_SYMBOL(server_api_get_strict) -MONGOCXX_LIBMONGOC_SYMBOL(server_api_get_version) -MONGOCXX_LIBMONGOC_SYMBOL(server_description_host) -MONGOCXX_LIBMONGOC_SYMBOL(server_description_id) -MONGOCXX_LIBMONGOC_SYMBOL(server_description_hello_response) -MONGOCXX_LIBMONGOC_SYMBOL(server_description_round_trip_time) -MONGOCXX_LIBMONGOC_SYMBOL(server_description_type) -MONGOCXX_LIBMONGOC_SYMBOL(server_descriptions_destroy_all) -MONGOCXX_LIBMONGOC_SYMBOL(session_opts_destroy) -MONGOCXX_LIBMONGOC_SYMBOL(session_opts_get_causal_consistency) -MONGOCXX_LIBMONGOC_SYMBOL(session_opts_get_snapshot) -MONGOCXX_LIBMONGOC_SYMBOL(session_opts_new) -MONGOCXX_LIBMONGOC_SYMBOL(session_opts_set_causal_consistency) -MONGOCXX_LIBMONGOC_SYMBOL(session_opts_set_snapshot) -MONGOCXX_LIBMONGOC_SYMBOL(session_opts_set_default_transaction_opts) -MONGOCXX_LIBMONGOC_SYMBOL(topology_description_get_servers) -MONGOCXX_LIBMONGOC_SYMBOL(topology_description_has_readable_server) -MONGOCXX_LIBMONGOC_SYMBOL(topology_description_has_writable_server) -MONGOCXX_LIBMONGOC_SYMBOL(topology_description_type) -MONGOCXX_LIBMONGOC_SYMBOL(transaction_opts_clone) -MONGOCXX_LIBMONGOC_SYMBOL(transaction_opts_destroy) -MONGOCXX_LIBMONGOC_SYMBOL(transaction_opts_new) -MONGOCXX_LIBMONGOC_SYMBOL(transaction_opts_get_read_concern) -MONGOCXX_LIBMONGOC_SYMBOL(transaction_opts_get_read_prefs) -MONGOCXX_LIBMONGOC_SYMBOL(transaction_opts_get_write_concern) -MONGOCXX_LIBMONGOC_SYMBOL(transaction_opts_get_max_commit_time_ms) -MONGOCXX_LIBMONGOC_SYMBOL(transaction_opts_set_read_concern) -MONGOCXX_LIBMONGOC_SYMBOL(transaction_opts_set_read_prefs) -MONGOCXX_LIBMONGOC_SYMBOL(transaction_opts_set_write_concern) -MONGOCXX_LIBMONGOC_SYMBOL(transaction_opts_set_max_commit_time_ms) -MONGOCXX_LIBMONGOC_SYMBOL(uri_copy) -MONGOCXX_LIBMONGOC_SYMBOL(uri_destroy) -MONGOCXX_LIBMONGOC_SYMBOL(uri_get_auth_mechanism) -MONGOCXX_LIBMONGOC_SYMBOL(uri_get_auth_source) -MONGOCXX_LIBMONGOC_SYMBOL(uri_get_compressors) -MONGOCXX_LIBMONGOC_SYMBOL(uri_get_credentials) -MONGOCXX_LIBMONGOC_SYMBOL(uri_get_database) -MONGOCXX_LIBMONGOC_SYMBOL(uri_get_hosts) -MONGOCXX_LIBMONGOC_SYMBOL(uri_get_option_as_utf8) -MONGOCXX_LIBMONGOC_SYMBOL(uri_get_options) -MONGOCXX_LIBMONGOC_SYMBOL(uri_get_password) -MONGOCXX_LIBMONGOC_SYMBOL(uri_get_read_concern) -MONGOCXX_LIBMONGOC_SYMBOL(uri_get_read_prefs_t) -MONGOCXX_LIBMONGOC_SYMBOL(uri_get_replica_set) -BSONCXX_SUPPRESS_DEPRECATION_WARNINGS_BEGIN -MONGOCXX_LIBMONGOC_SYMBOL(uri_get_ssl) -BSONCXX_SUPPRESS_DEPRECATION_WARNINGS_END -MONGOCXX_LIBMONGOC_SYMBOL(uri_get_tls) -MONGOCXX_LIBMONGOC_SYMBOL(uri_get_string) -MONGOCXX_LIBMONGOC_SYMBOL(uri_get_username) -MONGOCXX_LIBMONGOC_SYMBOL(uri_get_write_concern) -MONGOCXX_LIBMONGOC_SYMBOL(uri_new_with_error) -MONGOCXX_LIBMONGOC_SYMBOL(write_concern_copy) -MONGOCXX_LIBMONGOC_SYMBOL(write_concern_destroy) -MONGOCXX_LIBMONGOC_SYMBOL(write_concern_get_journal) -MONGOCXX_LIBMONGOC_SYMBOL(write_concern_get_w) -MONGOCXX_LIBMONGOC_SYMBOL(write_concern_get_wmajority) -MONGOCXX_LIBMONGOC_SYMBOL(write_concern_get_wtag) -MONGOCXX_LIBMONGOC_SYMBOL(write_concern_get_wtimeout) -MONGOCXX_LIBMONGOC_SYMBOL(write_concern_is_acknowledged) -MONGOCXX_LIBMONGOC_SYMBOL(write_concern_journal_is_set) -MONGOCXX_LIBMONGOC_SYMBOL(write_concern_new) -MONGOCXX_LIBMONGOC_SYMBOL(write_concern_set_journal) -MONGOCXX_LIBMONGOC_SYMBOL(write_concern_set_w) -MONGOCXX_LIBMONGOC_SYMBOL(write_concern_set_wmajority) -MONGOCXX_LIBMONGOC_SYMBOL(write_concern_set_wtag) -MONGOCXX_LIBMONGOC_SYMBOL(write_concern_set_wtimeout) - -#if defined(MONGOC_ENABLE_SSL) -MONGOCXX_LIBMONGOC_SYMBOL(client_pool_set_ssl_opts) -MONGOCXX_LIBMONGOC_SYMBOL(client_set_ssl_opts) -#endif diff --git a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/read_concern.cpp b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/read_concern.cpp index aee5101e4f..129cfc3215 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/read_concern.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/read_concern.cpp @@ -13,16 +13,16 @@ // limitations under the License. #include -#include #include #include #include -#include -#include #include -#include +#include + +#include +#include namespace mongocxx { namespace v_noabi { diff --git a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/read_preference.cpp b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/read_preference.cpp index 68f2d693d9..0d109bee20 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/read_preference.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/read_preference.cpp @@ -12,18 +12,18 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include #include #include #include -#include -#include -#include -#include #include -#include +#include + +#include +#include +#include +#include namespace mongocxx { namespace v_noabi { diff --git a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/result/bulk_write.cpp b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/result/bulk_write.cpp index 37e27a6257..60363ac87d 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/result/bulk_write.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/result/bulk_write.cpp @@ -14,8 +14,6 @@ #include -#include - namespace mongocxx { namespace v_noabi { namespace result { diff --git a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/result/delete.cpp b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/result/delete.cpp index b8751ac7e1..96e0aaa7a1 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/result/delete.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/result/delete.cpp @@ -14,8 +14,6 @@ #include -#include - namespace mongocxx { namespace v_noabi { namespace result { diff --git a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/result/gridfs/upload.cpp b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/result/gridfs/upload.cpp index 440c036f63..c44f1088c3 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/result/gridfs/upload.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/result/gridfs/upload.cpp @@ -16,8 +16,6 @@ #include -#include - namespace mongocxx { namespace v_noabi { namespace result { diff --git a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/result/insert_many.cpp b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/result/insert_many.cpp index 08a2ed89b6..abd0693a64 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/result/insert_many.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/result/insert_many.cpp @@ -16,8 +16,6 @@ #include -#include - namespace mongocxx { namespace v_noabi { namespace result { diff --git a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/result/insert_one.cpp b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/result/insert_one.cpp index b61b208635..8db2abaafa 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/result/insert_one.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/result/insert_one.cpp @@ -16,8 +16,6 @@ #include -#include - namespace mongocxx { namespace v_noabi { namespace result { diff --git a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/result/replace_one.cpp b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/result/replace_one.cpp index 33c61bc985..2a3a098690 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/result/replace_one.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/result/replace_one.cpp @@ -14,8 +14,6 @@ #include -#include - namespace mongocxx { namespace v_noabi { namespace result { diff --git a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/result/rewrap_many_datakey.cpp b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/result/rewrap_many_datakey.cpp index e66c31c0fc..2e59de52c8 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/result/rewrap_many_datakey.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/result/rewrap_many_datakey.cpp @@ -13,10 +13,9 @@ // limitations under the License. #include -#include #include -#include +#include namespace mongocxx { namespace v_noabi { diff --git a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/result/update.cpp b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/result/update.cpp index a7901aa160..f60790bc48 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/result/update.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/result/update.cpp @@ -14,8 +14,6 @@ #include -#include - namespace mongocxx { namespace v_noabi { namespace result { diff --git a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/search_index_model.cpp b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/search_index_model.cpp index 00bde7223d..ea02fe5309 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/search_index_model.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/search_index_model.cpp @@ -1,11 +1,10 @@ -#include - #include #include -#include #include -#include +#include + +#include namespace mongocxx { namespace v_noabi { diff --git a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/search_index_view.cpp b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/search_index_view.cpp index cf40b45c9f..9c66a708f2 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/search_index_view.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/search_index_view.cpp @@ -1,11 +1,10 @@ -#include - #include #include -#include #include -#include +#include + +#include namespace mongocxx { namespace v_noabi { diff --git a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/uri.cpp b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/uri.cpp index 7293c8fb0f..6bd0b60b25 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/uri.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/uri.cpp @@ -12,19 +12,19 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include #include #include #include -#include +#include + +#include + +#include #include #include #include #include -#include - -#include namespace mongocxx { namespace v_noabi { diff --git a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/validation_criteria.cpp b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/validation_criteria.cpp index 040f88ec49..cd9171fa2e 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/validation_criteria.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/validation_criteria.cpp @@ -20,8 +20,6 @@ #include -#include - namespace { using bsoncxx::v_noabi::builder::basic::kvp; diff --git a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/write_concern.cpp b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/write_concern.cpp index c03b7f5018..0ca7fcb165 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/write_concern.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/write_concern.cpp @@ -15,17 +15,17 @@ #include #include -#include #include #include #include #include -#include -#include #include -#include +#include + +#include +#include namespace mongocxx { namespace v_noabi { diff --git a/src/mongocxx/test/bulk_write.cpp b/src/mongocxx/test/bulk_write.cpp index 73682e7958..97bd03da7b 100644 --- a/src/mongocxx/test/bulk_write.cpp +++ b/src/mongocxx/test/bulk_write.cpp @@ -18,9 +18,10 @@ #include #include #include -#include #include +#include + #include #include diff --git a/src/mongocxx/test/catch.cpp b/src/mongocxx/test/catch.cpp index 9e11603f04..001f594159 100644 --- a/src/mongocxx/test/catch.cpp +++ b/src/mongocxx/test/catch.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include +#include #include diff --git a/src/mongocxx/test/catch_helpers.hh b/src/mongocxx/test/catch_helpers.hh index 0bcf1b7f07..4dca3465ee 100644 --- a/src/mongocxx/test/catch_helpers.hh +++ b/src/mongocxx/test/catch_helpers.hh @@ -15,9 +15,8 @@ #pragma once #include -#include -#include +#include #include @@ -257,5 +256,3 @@ class mongocxx_exception_matcher : public Catch::Matchers::MatcherBase diff --git a/src/mongocxx/test/change_streams.cpp b/src/mongocxx/test/change_streams.cpp index f6c5f4dea3..154b713f85 100644 --- a/src/mongocxx/test/change_streams.cpp +++ b/src/mongocxx/test/change_streams.cpp @@ -17,7 +17,6 @@ #include #include -#include #include #include @@ -26,9 +25,12 @@ #include #include #include -#include #include +#include + +#include + #include #include diff --git a/src/mongocxx/test/client.cpp b/src/mongocxx/test/client.cpp index db06bdbae5..c7435e096e 100644 --- a/src/mongocxx/test/client.cpp +++ b/src/mongocxx/test/client.cpp @@ -12,17 +12,21 @@ // See the License for the specific language governing permissions and // limitations under the License. +#include + +// + +#include + #include -#include #include #include #include -#include -#include #include -#include +#include +#include #include diff --git a/src/mongocxx/test/client_helpers.cpp b/src/mongocxx/test/client_helpers.cpp index a61ae47e6d..81cf9d11db 100644 --- a/src/mongocxx/test/client_helpers.cpp +++ b/src/mongocxx/test/client_helpers.cpp @@ -35,11 +35,9 @@ #include #include #include -#include -#include - -#include +#include +#include #include diff --git a/src/mongocxx/test/client_helpers.hh b/src/mongocxx/test/client_helpers.hh index 5b531c47c8..63522a5e6d 100644 --- a/src/mongocxx/test/client_helpers.hh +++ b/src/mongocxx/test/client_helpers.hh @@ -31,9 +31,8 @@ #include #include #include -#include -#include +#include #include @@ -249,5 +248,3 @@ std::string getenv_or_fail(const std::string env_name); } // namespace test_util } // namespace mongocxx - -#include diff --git a/src/mongocxx/test/client_session.cpp b/src/mongocxx/test/client_session.cpp index dd4709050e..a9579c2d36 100644 --- a/src/mongocxx/test/client_session.cpp +++ b/src/mongocxx/test/client_session.cpp @@ -14,15 +14,16 @@ #include -#include -#include - #include #include #include #include #include -#include + +#include +#include + +#include #include diff --git a/src/mongocxx/test/client_side_encryption.cpp b/src/mongocxx/test/client_side_encryption.cpp index 2547e15a74..3670aa4411 100644 --- a/src/mongocxx/test/client_side_encryption.cpp +++ b/src/mongocxx/test/client_side_encryption.cpp @@ -23,7 +23,6 @@ #include #include #include -#include #include #include #include @@ -38,11 +37,12 @@ #include #include #include -#include #include #include -#include +#include + +#include #include diff --git a/src/mongocxx/test/collection.cpp b/src/mongocxx/test/collection.cpp index 1d61af8876..b05ab3ea0c 100644 --- a/src/mongocxx/test/collection.cpp +++ b/src/mongocxx/test/collection.cpp @@ -20,7 +20,6 @@ #include #include -#include #include #include #include @@ -34,11 +33,14 @@ #include #include #include -#include -#include #include #include +#include + +#include +#include + #include #include diff --git a/src/mongocxx/test/collection_mocked.cpp b/src/mongocxx/test/collection_mocked.cpp index 47eb71e6ea..f3948057df 100644 --- a/src/mongocxx/test/collection_mocked.cpp +++ b/src/mongocxx/test/collection_mocked.cpp @@ -18,8 +18,6 @@ #include #include #include -#include -#include #include #include @@ -30,11 +28,15 @@ #include #include #include -#include -#include -#include #include +#include +#include + +#include +#include +#include + #include #include diff --git a/src/mongocxx/test/conversions.cpp b/src/mongocxx/test/conversions.cpp index 3bdf8cea1a..91ca3c7df6 100644 --- a/src/mongocxx/test/conversions.cpp +++ b/src/mongocxx/test/conversions.cpp @@ -12,9 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include #include +#include + #include namespace { diff --git a/src/mongocxx/test/database.cpp b/src/mongocxx/test/database.cpp index f8fd931694..14377f4500 100644 --- a/src/mongocxx/test/database.cpp +++ b/src/mongocxx/test/database.cpp @@ -24,9 +24,10 @@ #include #include #include + +#include #include -#include -#include +#include #include diff --git a/src/mongocxx/test/logging.cpp b/src/mongocxx/test/logging.cpp index 72c6993a96..904116f6c7 100644 --- a/src/mongocxx/test/logging.cpp +++ b/src/mongocxx/test/logging.cpp @@ -14,11 +14,12 @@ #include -#include - #include #include -#include + +#include + +#include #include diff --git a/src/mongocxx/test/options/index.cpp b/src/mongocxx/test/options/index.cpp index 2c30027e5b..a790c90ae2 100644 --- a/src/mongocxx/test/options/index.cpp +++ b/src/mongocxx/test/options/index.cpp @@ -13,12 +13,13 @@ // limitations under the License. #include -#include #include #include #include +#include + #include #include diff --git a/src/mongocxx/test/pool.cpp b/src/mongocxx/test/pool.cpp index b9cf52630b..f6f05e072e 100644 --- a/src/mongocxx/test/pool.cpp +++ b/src/mongocxx/test/pool.cpp @@ -20,9 +20,8 @@ #include #include #include -#include -#include +#include #include diff --git a/src/mongocxx/test/private/numeric_casting.cpp b/src/mongocxx/test/private/numeric_casting.cpp index 08436076e3..dfaaaaf98e 100644 --- a/src/mongocxx/test/private/numeric_casting.cpp +++ b/src/mongocxx/test/private/numeric_casting.cpp @@ -14,7 +14,7 @@ #include -#include +#include #include #include diff --git a/src/mongocxx/test/private/scoped_bson_t.cpp b/src/mongocxx/test/private/scoped_bson_t.cpp index a8f19cd305..a21cc4382f 100644 --- a/src/mongocxx/test/private/scoped_bson_t.cpp +++ b/src/mongocxx/test/private/scoped_bson_t.cpp @@ -16,7 +16,7 @@ #include #include -#include +#include #include diff --git a/src/mongocxx/test/private/write_concern.cpp b/src/mongocxx/test/private/write_concern.cpp index c2b3f8da7d..3b19165cba 100644 --- a/src/mongocxx/test/private/write_concern.cpp +++ b/src/mongocxx/test/private/write_concern.cpp @@ -13,10 +13,11 @@ // limitations under the License. #include -#include -#include #include +#include +#include + #include namespace { diff --git a/src/mongocxx/test/read_preference.cpp b/src/mongocxx/test/read_preference.cpp index 30e30532d7..4920c5fc72 100644 --- a/src/mongocxx/test/read_preference.cpp +++ b/src/mongocxx/test/read_preference.cpp @@ -18,9 +18,10 @@ #include #include -#include #include +#include + #include #include diff --git a/src/mongocxx/test/spec/gridfs.cpp b/src/mongocxx/test/spec/gridfs.cpp index a45b7202ff..aacbba2ce3 100644 --- a/src/mongocxx/test/spec/gridfs.cpp +++ b/src/mongocxx/test/spec/gridfs.cpp @@ -26,7 +26,6 @@ #include #include #include -#include #include #include #include @@ -41,6 +40,8 @@ #include #include +#include + #include #include diff --git a/src/mongocxx/test/spec/monitoring.cpp b/src/mongocxx/test/spec/monitoring.cpp index 6015d6c1cb..d00bddb8da 100644 --- a/src/mongocxx/test/spec/monitoring.cpp +++ b/src/mongocxx/test/spec/monitoring.cpp @@ -20,8 +20,6 @@ #include -#include - #include #include @@ -356,5 +354,3 @@ void apm_checker::clear() { } // namespace spec } // namespace mongocxx - -#include diff --git a/src/mongocxx/test/spec/monitoring.hh b/src/mongocxx/test/spec/monitoring.hh index 0b3888f391..d522dfe90a 100644 --- a/src/mongocxx/test/spec/monitoring.hh +++ b/src/mongocxx/test/spec/monitoring.hh @@ -16,8 +16,6 @@ #include -#include - #include #include @@ -87,5 +85,3 @@ class apm_checker { } // namespace spec } // namespace mongocxx - -#include diff --git a/src/mongocxx/test/spec/operation.cpp b/src/mongocxx/test/spec/operation.cpp index adb792142a..3abd91f4a4 100644 --- a/src/mongocxx/test/spec/operation.cpp +++ b/src/mongocxx/test/spec/operation.cpp @@ -41,8 +41,6 @@ #include #include -#include - #include #include @@ -1579,5 +1577,3 @@ document::value operation_runner::run(document::view operation) { } // namespace spec } // namespace mongocxx - -#include diff --git a/src/mongocxx/test/spec/operation.hh b/src/mongocxx/test/spec/operation.hh index 6e8bd2d37e..58da3101cd 100644 --- a/src/mongocxx/test/spec/operation.hh +++ b/src/mongocxx/test/spec/operation.hh @@ -22,9 +22,8 @@ #include #include -#include -#include +#include namespace mongocxx { namespace spec { @@ -87,5 +86,3 @@ class operation_runner { } // namespace spec } // namespace mongocxx - -#include diff --git a/src/mongocxx/test/spec/unified_tests/assert.cpp b/src/mongocxx/test/spec/unified_tests/assert.cpp index ea95447962..a11656ff09 100644 --- a/src/mongocxx/test/spec/unified_tests/assert.cpp +++ b/src/mongocxx/test/spec/unified_tests/assert.cpp @@ -14,6 +14,10 @@ #include "assert.hh" +// + +#include + #include #include #include @@ -24,8 +28,6 @@ #include #include -#include - #include #include diff --git a/src/mongocxx/test/spec/unified_tests/assert.hh b/src/mongocxx/test/spec/unified_tests/assert.hh index a3be3294ba..852bf0a9cc 100644 --- a/src/mongocxx/test/spec/unified_tests/assert.hh +++ b/src/mongocxx/test/spec/unified_tests/assert.hh @@ -18,8 +18,6 @@ #include -#include - namespace mongocxx { namespace assert { @@ -32,5 +30,3 @@ void matches( } // namespace assert } // namespace mongocxx - -#include diff --git a/src/mongocxx/test/spec/unified_tests/entity.cpp b/src/mongocxx/test/spec/unified_tests/entity.cpp index c5d2c1df30..4d8510df81 100644 --- a/src/mongocxx/test/spec/unified_tests/entity.cpp +++ b/src/mongocxx/test/spec/unified_tests/entity.cpp @@ -18,8 +18,6 @@ #include -#include - namespace mongocxx { namespace entity { diff --git a/src/mongocxx/test/spec/unified_tests/entity.hh b/src/mongocxx/test/spec/unified_tests/entity.hh index 418f2b26e0..60ab5b9225 100644 --- a/src/mongocxx/test/spec/unified_tests/entity.hh +++ b/src/mongocxx/test/spec/unified_tests/entity.hh @@ -22,8 +22,6 @@ #include #include -#include - namespace mongocxx { namespace entity { @@ -89,5 +87,3 @@ class map { } // namespace entity } // namespace mongocxx - -#include diff --git a/src/mongocxx/test/spec/unified_tests/operations.cpp b/src/mongocxx/test/spec/unified_tests/operations.cpp index d1ee431d6c..fa0cd60982 100644 --- a/src/mongocxx/test/spec/unified_tests/operations.cpp +++ b/src/mongocxx/test/spec/unified_tests/operations.cpp @@ -25,8 +25,6 @@ #include #include -#include - #include #include diff --git a/src/mongocxx/test/spec/unified_tests/operations.hh b/src/mongocxx/test/spec/unified_tests/operations.hh index 1c088c4215..a61df341c5 100644 --- a/src/mongocxx/test/spec/unified_tests/operations.hh +++ b/src/mongocxx/test/spec/unified_tests/operations.hh @@ -22,8 +22,6 @@ #include #include -#include - #include namespace mongocxx { @@ -46,5 +44,3 @@ bsoncxx::stdx::optional lookup_read_preference(bsoncxx::documen } // namespace operations } // namespace mongocxx - -#include diff --git a/src/mongocxx/test/spec/util.cpp b/src/mongocxx/test/spec/util.cpp index 1ce5989137..356b7301d9 100644 --- a/src/mongocxx/test/spec/util.cpp +++ b/src/mongocxx/test/spec/util.cpp @@ -41,8 +41,6 @@ #include #include -#include - #include #include @@ -1120,5 +1118,3 @@ void run_crud_tests_in_file(std::string const& test_path, uri test_uri) { } // namespace spec } // namespace mongocxx - -#include diff --git a/src/mongocxx/test/spec/util.hh b/src/mongocxx/test/spec/util.hh index 68aa0c8089..1e9cd15218 100644 --- a/src/mongocxx/test/spec/util.hh +++ b/src/mongocxx/test/spec/util.hh @@ -23,8 +23,6 @@ #include #include -#include - #include namespace mongocxx { @@ -126,5 +124,3 @@ void run_crud_tests_in_file(std::string const& test_path, uri test_uri = uri{}); } // namespace spec } // namespace mongocxx - -#include