From 41f5f2b26af33a1b19fff5c0b24b58ea7976d777 Mon Sep 17 00:00:00 2001 From: Ezra Chung Date: Fri, 10 Jan 2025 15:12:07 -0600 Subject: [PATCH 01/19] format: add v1 header groups --- .clang-format | 38 +++++++++++++++++++++++++++++--------- 1 file changed, 29 insertions(+), 9 deletions(-) diff --git a/.clang-format b/.clang-format index 7cf63c1ad3..53a87d4046 100644 --- a/.clang-format +++ b/.clang-format @@ -144,24 +144,44 @@ IncludeBlocks: Regroup IncludeCategories: - Regex: '".*"' # relative headers Priority: 10 + - Regex: 'bsoncxx/v1/.*/prelude\.hpp' # v1 preludes + Priority: 20 + - Regex: 'mongocxx/v1/.*/prelude\.hpp' # v1 preludes + Priority: 21 + - Regex: 'bsoncxx/v1/.*(-|\/)fwd\.hpp' # v1 forwarding headers + Priority: 22 + - Regex: 'mongocxx/v1/.*(-|\/)fwd\.hpp' # v1 forwarding headers + Priority: 23 + - Regex: 'bsoncxx/v1/.*\.hpp' # v1 public headers + Priority: 24 + - Regex: 'mongocxx/v1/.*\.hpp' # v1 public headers + Priority: 25 + - Regex: 'bsoncxx/v1/.*\.hh' # v1 private headers + Priority: 26 + - Regex: 'mongocxx/v1/.*\.hh' # v1 private headers + Priority: 27 + - Regex: 'bsoncxx/v1/.*\.hh' # v1 private headers + Priority: 28 + - Regex: 'mongocxx/v1/.*\.hh' # v1 private headers + Priority: 29 - Regex: 'bsoncxx/config(/private)?/prelude\.(hpp|hh)' # v_noabi preludes - Priority: 50 + Priority: 60 - Regex: 'mongocxx/config(/private)?/prelude\.(hpp|hh)' # v_noabi preludes - Priority: 51 + Priority: 61 - Regex: 'bsoncxx/test/.*' # test headers - Priority: 60 + Priority: 70 - Regex: 'mongocxx/test/.*' # test headers - Priority: 61 + Priority: 71 - Regex: '<[[:alnum:]_.]+>' # system headers - Priority: 20 - - Regex: 'bsoncxx/.*(-|\/)fwd\.(hpp|hh)' # all driver forwarding headers Priority: 30 + - Regex: 'bsoncxx/.*(-|\/)fwd\.(hpp|hh)' # all driver forwarding headers + Priority: 40 - Regex: 'mongocxx/.*(-|\/)fwd\.(hpp|hh)' # all driver forwarding headers - Priority: 31 + Priority: 41 - Regex: 'bsoncxx/.*' # all remaining (normal) driver headers - Priority: 40 + Priority: 50 - Regex: 'mongocxx/.*' # all remaining (normal) driver headers - Priority: 41 + Priority: 51 - Regex: '.*' # all other headers (third party) Priority: 90 IncludeIsMainRegex: '([-_](test|unittest))?$' From e65e63adeffa407279069eba1984202ae7e8c1c5 Mon Sep 17 00:00:00 2001 From: Ezra Chung Date: Fri, 10 Jan 2025 15:12:07 -0600 Subject: [PATCH 02/19] Fix library name in mongocxx doc.hpp --- src/mongocxx/include/mongocxx/docs/top.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mongocxx/include/mongocxx/docs/top.hpp b/src/mongocxx/include/mongocxx/docs/top.hpp index 9583329468..6b25207197 100644 --- a/src/mongocxx/include/mongocxx/docs/top.hpp +++ b/src/mongocxx/include/mongocxx/docs/top.hpp @@ -39,7 +39,7 @@ /// /// In addition to declaring ABI namespaces (`v_noabi`, `v1`, etc.), this namespace also provides /// "redeclarations" of entities within ABI namespaces. These redeclarations are intended to be the -/// preferred method for using bsoncxx library entities when ABI stability of the bsoncxx library is +/// preferred method for using mongocxx library entities when ABI stability of the mongocxx library is /// NOT a requirement by the user. See [Root Namespace /// Redeclarations](https://www.mongodb.com/docs/languages/cpp/cpp-driver/current/api-abi-versioning/abi-versioning/#std-label-cpp-abi-root-namespace-redec). /// From 64097b44264dbd4ac9f33a025b9defcf86ba327a Mon Sep 17 00:00:00 2001 From: Ezra Chung Date: Fri, 10 Jan 2025 15:12:07 -0600 Subject: [PATCH 03/19] v1: doc.hpp --- src/bsoncxx/include/bsoncxx/docs/v1.hpp | 24 +++++++++++++++++++++++ src/mongocxx/include/mongocxx/docs/v1.hpp | 24 +++++++++++++++++++++++ 2 files changed, 48 insertions(+) create mode 100644 src/bsoncxx/include/bsoncxx/docs/v1.hpp create mode 100644 src/mongocxx/include/mongocxx/docs/v1.hpp diff --git a/src/bsoncxx/include/bsoncxx/docs/v1.hpp b/src/bsoncxx/include/bsoncxx/docs/v1.hpp new file mode 100644 index 0000000000..7d2847b5e7 --- /dev/null +++ b/src/bsoncxx/include/bsoncxx/docs/v1.hpp @@ -0,0 +1,24 @@ +// 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. + +#if !defined(BSONCXX_PRIVATE_DOXYGEN_PREPROCESSOR) +#error "This file is for documentation purposes only. It should not be included." +#endif // !defined(BSONCXX_PRIVATE_DOXYGEN_PREPROCESSOR) + +/// +/// @file +/// For documentation purposes only. +/// +/// @note This header is not includable! +/// diff --git a/src/mongocxx/include/mongocxx/docs/v1.hpp b/src/mongocxx/include/mongocxx/docs/v1.hpp new file mode 100644 index 0000000000..0f01380d0d --- /dev/null +++ b/src/mongocxx/include/mongocxx/docs/v1.hpp @@ -0,0 +1,24 @@ +// 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. + +#if !defined(MONGOCXX_PRIVATE_DOXYGEN_PREPROCESSOR) +#error "This file is for documentation purposes only. It should not be included." +#endif // !defined(MONGOCXX_PRIVATE_DOXYGEN_PREPROCESSOR) + +/// +/// @file +/// For documentation purposes only. +/// +/// @note This header is not includable! +/// From 2470ebb20135f2abc0ba7ac4026c734f91bab580 Mon Sep 17 00:00:00 2001 From: Ezra Chung Date: Fri, 10 Jan 2025 15:12:08 -0600 Subject: [PATCH 04/19] v1: add macro guard headers --- src/bsoncxx/include/bsoncxx/docs/v1.hpp | 17 ++++++++++ src/bsoncxx/include/bsoncxx/docs/v_noabi.hpp | 7 ++--- .../include/bsoncxx/v1/detail/postlude.hpp | 31 +++++++++++++++++++ .../include/bsoncxx/v1/detail/prelude.hpp | 30 ++++++++++++++++++ .../v_noabi/bsoncxx/config/postlude.hpp | 10 +++--- .../v_noabi/bsoncxx/config/prelude.hpp | 8 ++--- src/bsoncxx/lib/CMakeLists.txt | 7 +++++ .../lib/bsoncxx/v1/detail/postlude.cpp | 23 ++++++++++++++ src/bsoncxx/lib/bsoncxx/v1/detail/prelude.cpp | 19 ++++++++++++ src/bsoncxx/test/CMakeLists.txt | 3 ++ src/mongocxx/include/mongocxx/docs/v1.hpp | 17 ++++++++++ .../include/mongocxx/v1/detail/postlude.hpp | 31 +++++++++++++++++++ .../include/mongocxx/v1/detail/prelude.hpp | 30 ++++++++++++++++++ .../v_noabi/mongocxx/config/postlude.hpp | 10 +++--- .../v_noabi/mongocxx/config/prelude.hpp | 8 ++--- src/mongocxx/lib/CMakeLists.txt | 7 +++++ .../lib/mongocxx/v1/detail/postlude.cpp | 23 ++++++++++++++ .../lib/mongocxx/v1/detail/prelude.cpp | 19 ++++++++++++ src/mongocxx/test/CMakeLists.txt | 3 ++ 19 files changed, 283 insertions(+), 20 deletions(-) create mode 100644 src/bsoncxx/include/bsoncxx/v1/detail/postlude.hpp create mode 100644 src/bsoncxx/include/bsoncxx/v1/detail/prelude.hpp create mode 100644 src/bsoncxx/lib/bsoncxx/v1/detail/postlude.cpp create mode 100644 src/bsoncxx/lib/bsoncxx/v1/detail/prelude.cpp create mode 100644 src/mongocxx/include/mongocxx/v1/detail/postlude.hpp create mode 100644 src/mongocxx/include/mongocxx/v1/detail/prelude.hpp create mode 100644 src/mongocxx/lib/mongocxx/v1/detail/postlude.cpp create mode 100644 src/mongocxx/lib/mongocxx/v1/detail/prelude.cpp diff --git a/src/bsoncxx/include/bsoncxx/docs/v1.hpp b/src/bsoncxx/include/bsoncxx/docs/v1.hpp index 7d2847b5e7..6dc2a7ab8d 100644 --- a/src/bsoncxx/include/bsoncxx/docs/v1.hpp +++ b/src/bsoncxx/include/bsoncxx/docs/v1.hpp @@ -22,3 +22,20 @@ /// /// @note This header is not includable! /// + +/// +/// @dir bsoncxx/v1 +/// Provides headers declaring entities in @ref bsoncxx::v1. +/// + +/// +/// @dir bsoncxx/v1/detail +/// Provides headers for internal use only. +/// +/// @warning For internal use only! +/// + +/// +/// @namespace bsoncxx::v1 +/// Declares entities whose ABI stability is guaranteed for documented symbols. +/// diff --git a/src/bsoncxx/include/bsoncxx/docs/v_noabi.hpp b/src/bsoncxx/include/bsoncxx/docs/v_noabi.hpp index 551092636d..a9275ae284 100644 --- a/src/bsoncxx/include/bsoncxx/docs/v_noabi.hpp +++ b/src/bsoncxx/include/bsoncxx/docs/v_noabi.hpp @@ -25,11 +25,10 @@ /// /// @dir bsoncxx/v_noabi -/// The directory relative to which headers declaring entities in @ref bsoncxx::v_noabi are -/// typically included. +/// Provides headers declaring entities in @ref bsoncxx::v_noabi. /// -/// For backward compatibility, unstable ABI headers may be included using the syntax -/// ``, which is equivalent to ``. +/// Unstable ABI headers may be included using the syntax ``, which is equivalent to +/// ``. /// /// diff --git a/src/bsoncxx/include/bsoncxx/v1/detail/postlude.hpp b/src/bsoncxx/include/bsoncxx/v1/detail/postlude.hpp new file mode 100644 index 0000000000..4f4ba7522e --- /dev/null +++ b/src/bsoncxx/include/bsoncxx/v1/detail/postlude.hpp @@ -0,0 +1,31 @@ +// 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. + +#if !defined(BSONCXX_PRIVATE_V1_INSIDE_MACRO_GUARD_SCOPE) +#error "postlude header included without a matching prelude header" +#endif +#pragma pop_macro("BSONCXX_PRIVATE_V1_INSIDE_MACRO_GUARD_SCOPE") + +/// +/// @file +/// The bsoncxx v1 macro guard postlude header. +/// +/// @warning For internal use only! +/// +/// This header uses macro pragmas to guard macros defined by the bsoncxx library for internal use +/// by "popping" their prior definition onto the stack after use by bsoncxx headers. +/// +/// @see +/// - @ref bsoncxx/v1/detail/prelude.hpp +/// diff --git a/src/bsoncxx/include/bsoncxx/v1/detail/prelude.hpp b/src/bsoncxx/include/bsoncxx/v1/detail/prelude.hpp new file mode 100644 index 0000000000..3c1c364b0e --- /dev/null +++ b/src/bsoncxx/include/bsoncxx/v1/detail/prelude.hpp @@ -0,0 +1,30 @@ +// 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 push_macro("BSONCXX_PRIVATE_V1_INSIDE_MACRO_GUARD_SCOPE") +#undef BSONCXX_PRIVATE_V1_INSIDE_MACRO_GUARD_SCOPE +#define BSONCXX_PRIVATE_V1_INSIDE_MACRO_GUARD_SCOPE + +/// +/// @file +/// The bsoncxx v1 macro guard prelude header. +/// +/// @warning For internal use only! +/// +/// This header uses macro pragmas to guard macros defined by the bsoncxx library for internal use +/// by "pushing" their prior definition onto the stack before use by bsoncxx headers. +/// +/// @see +/// - @ref bsoncxx/v1/detail/postlude.hpp +/// diff --git a/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/config/postlude.hpp b/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/config/postlude.hpp index b11832c989..a66730dc20 100644 --- a/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/config/postlude.hpp +++ b/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/config/postlude.hpp @@ -69,15 +69,17 @@ #pragma pop_macro("BSONCXX_FWD") +#include + /// /// @file -/// The bsoncxx macro guard postlude header. +/// The bsoncxx v_noabi macro guard postlude header. /// /// @warning For internal use only! /// -/// This header uses macro pragmas to guard macros defined by the bsoncxx library for internal use -/// by "popping" their prior definition onto the stack after use by bsoncxx headers. +/// @par Includes +/// - @ref bsoncxx/v1/detail/postlude.hpp /// /// @see -/// - @ref bsoncxx/v_noabi/bsoncxx/config/prelude.hpp +/// - @ref bsoncxx/v1/detail/prelude.hpp /// diff --git a/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/config/prelude.hpp b/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/config/prelude.hpp index 76d516ea4e..198583047d 100644 --- a/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/config/prelude.hpp +++ b/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/config/prelude.hpp @@ -12,6 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +#include + // util.hpp #pragma push_macro("BSONCXX_CONCAT") #undef BSONCXX_CONCAT @@ -101,20 +103,18 @@ /// /// @file -/// The bsoncxx macro guard prelude header. +/// The bsoncxx v_noabi macro guard prelude header. /// /// @warning For internal use only! /// /// @par Includes +/// - @ref bsoncxx/v1/detail/prelude.hpp /// - @ref bsoncxx/v_noabi/bsoncxx/config/compiler.hpp /// - @ref bsoncxx/v_noabi/bsoncxx/config/config.hpp /// - @ref bsoncxx/v_noabi/bsoncxx/config/export.hpp /// - @ref bsoncxx/v_noabi/bsoncxx/config/util.hpp /// - @ref bsoncxx/v_noabi/bsoncxx/config/version.hpp /// -/// This header uses macro pragmas to guard macros defined by the bsoncxx library for internal use -/// by "pushing" their prior definition onto the stack before use by bsoncxx headers. -/// /// @see /// - @ref bsoncxx/v_noabi/bsoncxx/config/postlude.hpp /// diff --git a/src/bsoncxx/lib/CMakeLists.txt b/src/bsoncxx/lib/CMakeLists.txt index 3188da6fa4..ef30509f06 100644 --- a/src/bsoncxx/lib/CMakeLists.txt +++ b/src/bsoncxx/lib/CMakeLists.txt @@ -33,8 +33,14 @@ set(bsoncxx_sources_v_noabi bsoncxx/v_noabi/bsoncxx/validate.cpp ) +set(bsoncxx_sources_v1 + bsoncxx/v1/detail/postlude.cpp + bsoncxx/v1/detail/prelude.cpp +) + list(APPEND bsoncxx_sources ${bsoncxx_sources_v_noabi} + ${bsoncxx_sources_v1} ) list(TRANSFORM bsoncxx_sources PREPEND "${CMAKE_CURRENT_SOURCE_DIR}/") set(bsoncxx_sources "${bsoncxx_sources}" PARENT_SCOPE) @@ -70,6 +76,7 @@ endif() set_dist_list(src_bsoncxx_lib_DIST CMakeLists.txt ${bsoncxx_sources_v_noabi} + ${bsoncxx_sources_v1} bsoncxx/v_noabi/bsoncxx/config/config.hpp.in bsoncxx/v_noabi/bsoncxx/config/private/config.hh.in bsoncxx/v_noabi/bsoncxx/config/private/postlude.hh diff --git a/src/bsoncxx/lib/bsoncxx/v1/detail/postlude.cpp b/src/bsoncxx/lib/bsoncxx/v1/detail/postlude.cpp new file mode 100644 index 0000000000..7d77c7cd36 --- /dev/null +++ b/src/bsoncxx/lib/bsoncxx/v1/detail/postlude.cpp @@ -0,0 +1,23 @@ +// 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 + +// ^|v Prelude header must come before postlude header. + +#include + +#if defined(BSONCXX_PRIVATE_V1_INSIDE_MACRO_GUARD_SCOPE) +#error "BSONCXX_PRIVATE_V1_INSIDE_MACRO_GUARD_SCOPE should be undefined after including final postlude header" +#endif diff --git a/src/bsoncxx/lib/bsoncxx/v1/detail/prelude.cpp b/src/bsoncxx/lib/bsoncxx/v1/detail/prelude.cpp new file mode 100644 index 0000000000..c24e62cd17 --- /dev/null +++ b/src/bsoncxx/lib/bsoncxx/v1/detail/prelude.cpp @@ -0,0 +1,19 @@ +// 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 + +#if !defined(BSONCXX_PRIVATE_V1_INSIDE_MACRO_GUARD_SCOPE) +#error "prelude header should define BSONCXX_PRIVATE_V1_INSIDE_MACRO_GUARD_SCOPE" +#endif diff --git a/src/bsoncxx/test/CMakeLists.txt b/src/bsoncxx/test/CMakeLists.txt index 4bf4586851..47c7c86c4b 100644 --- a/src/bsoncxx/test/CMakeLists.txt +++ b/src/bsoncxx/test/CMakeLists.txt @@ -85,6 +85,9 @@ if(ENABLE_MACRO_GUARD_TESTS) PROJECT_NAME bsoncxx PROJECT_TEST_PROPERTIES_TARGET bsoncxx::test_properties GUARDED_MACROS + # bsoncxx/v1/detail/prelude.hpp + BSONCXX_PRIVATE_V1_INSIDE_MACRO_GUARD_SCOPE + # config.hpp (generated by CMake) BSONCXX_POLY_USE_IMPLS BSONCXX_POLY_USE_STD diff --git a/src/mongocxx/include/mongocxx/docs/v1.hpp b/src/mongocxx/include/mongocxx/docs/v1.hpp index 0f01380d0d..877ad461bc 100644 --- a/src/mongocxx/include/mongocxx/docs/v1.hpp +++ b/src/mongocxx/include/mongocxx/docs/v1.hpp @@ -22,3 +22,20 @@ /// /// @note This header is not includable! /// + +/// +/// @dir mongocxx/v1 +/// Provides headers declaring entities in @ref mongocxx::v1. +/// + +/// +/// @dir mongocxx/v1/detail +/// Provides headers for internal use only. +/// +/// @warning For internal use only! +/// + +/// +/// @namespace mongocxx::v1 +/// Declares entities whose ABI stability is guaranteed for documented symbols. +/// diff --git a/src/mongocxx/include/mongocxx/v1/detail/postlude.hpp b/src/mongocxx/include/mongocxx/v1/detail/postlude.hpp new file mode 100644 index 0000000000..446c193977 --- /dev/null +++ b/src/mongocxx/include/mongocxx/v1/detail/postlude.hpp @@ -0,0 +1,31 @@ +// 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. + +#if !defined(MONGOCXX_PRIVATE_V1_INSIDE_MACRO_GUARD_SCOPE) +#error "postlude header included without a matching prelude header" +#endif +#pragma pop_macro("MONGOCXX_PRIVATE_V1_INSIDE_MACRO_GUARD_SCOPE") + +/// +/// @file +/// The mongocxx v1 macro guard postlude header. +/// +/// @warning For internal use only! +/// +/// This header uses macro pragmas to guard macros defined by the mongocxx library for internal use +/// by "popping" their prior definition onto the stack after use by mongocxx headers. +/// +/// @see +/// - @ref mongocxx/v1/detail/prelude.hpp +/// diff --git a/src/mongocxx/include/mongocxx/v1/detail/prelude.hpp b/src/mongocxx/include/mongocxx/v1/detail/prelude.hpp new file mode 100644 index 0000000000..31469b4390 --- /dev/null +++ b/src/mongocxx/include/mongocxx/v1/detail/prelude.hpp @@ -0,0 +1,30 @@ +// 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 push_macro("MONGOCXX_PRIVATE_V1_INSIDE_MACRO_GUARD_SCOPE") +#undef MONGOCXX_PRIVATE_V1_INSIDE_MACRO_GUARD_SCOPE +#define MONGOCXX_PRIVATE_V1_INSIDE_MACRO_GUARD_SCOPE + +/// +/// @file +/// The mongocxx v1 macro guard prelude header. +/// +/// @warning For internal use only! +/// +/// This header uses macro pragmas to guard macros defined by the mongocxx library for internal use +/// by "pushing" their prior definition onto the stack before use by mongocxx headers. +/// +/// @see +/// - @ref mongocxx/v1/detail/postlude.hpp +/// diff --git a/src/mongocxx/include/mongocxx/v_noabi/mongocxx/config/postlude.hpp b/src/mongocxx/include/mongocxx/v_noabi/mongocxx/config/postlude.hpp index c3cdbeb2ef..6f6839e0ce 100644 --- a/src/mongocxx/include/mongocxx/v_noabi/mongocxx/config/postlude.hpp +++ b/src/mongocxx/include/mongocxx/v_noabi/mongocxx/config/postlude.hpp @@ -36,15 +36,17 @@ #undef MONGOCXX_UNREACHABLE #pragma pop_macro("MONGOCXX_UNREACHABLE") +#include + /// /// @file -/// The mongocxx macro guard postlude header. +/// The mongocxx v_noabi macro guard postlude header. /// /// @warning For internal use only! /// -/// This header uses macro pragmas to guard macros defined by the mongocxx library for internal use -/// by "popping" their prior definition onto the stack after use by mongocxx headers. +/// @par Includes +/// - @ref mongocxx/v1/detail/postlude.hpp /// /// @see -/// - @ref mongocxx/v_noabi/mongocxx/config/prelude.hpp +/// - @ref mongocxx/v1/detail/prelude.hpp /// diff --git a/src/mongocxx/include/mongocxx/v_noabi/mongocxx/config/prelude.hpp b/src/mongocxx/include/mongocxx/v_noabi/mongocxx/config/prelude.hpp index 3693112040..df196e1640 100644 --- a/src/mongocxx/include/mongocxx/v_noabi/mongocxx/config/prelude.hpp +++ b/src/mongocxx/include/mongocxx/v_noabi/mongocxx/config/prelude.hpp @@ -12,6 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +#include + // version.hpp (generated by CMake) #pragma push_macro("MONGOCXX_VERSION_STRING") #undef MONGOCXX_VERSION_STRING @@ -50,19 +52,17 @@ /// /// @file -/// The mongocxx macro guard prelude header. +/// The mongocxx v_noabi macro guard prelude header. /// /// @warning For internal use only! /// /// @par Includes +/// - @ref mongocxx/v1/detail/prelude.hpp /// - @ref mongocxx/v_noabi/mongocxx/config/compiler.hpp /// - @ref mongocxx/v_noabi/mongocxx/config/config.hpp /// - @ref mongocxx/v_noabi/mongocxx/config/export.hpp /// - @ref mongocxx/v_noabi/mongocxx/config/version.hpp /// -/// This header uses macro pragmas to guard macros defined by the mongocxx library for internal use -/// by "pushing" their prior definition onto the stack before use by mongocxx headers. -/// /// @see /// - @ref mongocxx/v_noabi/mongocxx/config/postlude.hpp /// diff --git a/src/mongocxx/lib/CMakeLists.txt b/src/mongocxx/lib/CMakeLists.txt index de7cc981cc..1d37012008 100644 --- a/src/mongocxx/lib/CMakeLists.txt +++ b/src/mongocxx/lib/CMakeLists.txt @@ -114,8 +114,14 @@ set(mongocxx_sources_v_noabi mongocxx/v_noabi/mongocxx/write_concern.cpp ) +set(mongocxx_sources_v1 + mongocxx/v1/detail/postlude.cpp + mongocxx/v1/detail/prelude.cpp +) + list(APPEND mongocxx_sources ${mongocxx_sources_v_noabi} + ${mongocxx_sources_v1} ) list(TRANSFORM mongocxx_sources PREPEND "${CMAKE_CURRENT_SOURCE_DIR}/") set(mongocxx_sources "${mongocxx_sources}" PARENT_SCOPE) @@ -163,6 +169,7 @@ endif() set_dist_list(src_mongocxx_lib_DIST CMakeLists.txt ${mongocxx_sources_v_noabi} + ${mongocxx_sources_v1} mongocxx/v_noabi/mongocxx/config/config.hpp.in mongocxx/v_noabi/mongocxx/config/private/config.hh.in mongocxx/v_noabi/mongocxx/config/private/postlude.hh diff --git a/src/mongocxx/lib/mongocxx/v1/detail/postlude.cpp b/src/mongocxx/lib/mongocxx/v1/detail/postlude.cpp new file mode 100644 index 0000000000..39bdca1f37 --- /dev/null +++ b/src/mongocxx/lib/mongocxx/v1/detail/postlude.cpp @@ -0,0 +1,23 @@ +// 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 + +// ^|v Prelude header must come before postlude header. + +#include + +#if defined(MONGOCXX_PRIVATE_V1_INSIDE_MACRO_GUARD_SCOPE) +#error "MONGOCXX_PRIVATE_V1_INSIDE_MACRO_GUARD_SCOPE should be undefined after including final postlude header" +#endif diff --git a/src/mongocxx/lib/mongocxx/v1/detail/prelude.cpp b/src/mongocxx/lib/mongocxx/v1/detail/prelude.cpp new file mode 100644 index 0000000000..8a53b498f4 --- /dev/null +++ b/src/mongocxx/lib/mongocxx/v1/detail/prelude.cpp @@ -0,0 +1,19 @@ +// 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 + +#if !defined(MONGOCXX_PRIVATE_V1_INSIDE_MACRO_GUARD_SCOPE) +#error "prelude header should define MONGOCXX_PRIVATE_V1_INSIDE_MACRO_GUARD_SCOPE" +#endif diff --git a/src/mongocxx/test/CMakeLists.txt b/src/mongocxx/test/CMakeLists.txt index 92b7d5e37a..964242e113 100644 --- a/src/mongocxx/test/CMakeLists.txt +++ b/src/mongocxx/test/CMakeLists.txt @@ -292,6 +292,9 @@ if(ENABLE_MACRO_GUARD_TESTS) PROJECT_NAME mongocxx PROJECT_TEST_PROPERTIES_TARGET mongocxx::test_properties GUARDED_MACROS + # mongocxx/v1/detail/prelude.hpp + MONGOCXX_PRIVATE_V1_INSIDE_MACRO_GUARD_SCOPE + # version.hpp (generated by CMake) MONGOCXX_VERSION_STRING MONGOCXX_VERSION_EXTRA From b13118efe49aabba2a71a07ead9341a6cf38c93c Mon Sep 17 00:00:00 2001 From: Ezra Chung Date: Fri, 10 Jan 2025 15:12:08 -0600 Subject: [PATCH 05/19] v1: export.hpp --- src/bsoncxx/CMakeLists.txt | 6 ++-- src/bsoncxx/include/bsoncxx/docs/v1.hpp | 5 +++ .../include/bsoncxx/v1/detail/postlude.hpp | 10 ++++++ .../include/bsoncxx/v1/detail/prelude.hpp | 15 ++++++++ .../bsoncxx/v_noabi/bsoncxx/config/export.hpp | 26 ++++++++++++++ .../v_noabi/bsoncxx/config/postlude.hpp | 8 ----- .../v_noabi/bsoncxx/config/prelude.hpp | 14 -------- src/bsoncxx/lib/CMakeLists.txt | 2 ++ src/bsoncxx/lib/bsoncxx/v1/config/export.cpp | 35 +++++++++++++++++++ .../bsoncxx/v_noabi/bsoncxx/config/export.cpp | 35 +++++++++++++++++++ src/bsoncxx/test/CMakeLists.txt | 16 ++++----- src/mongocxx/CMakeLists.txt | 6 ++-- src/mongocxx/include/mongocxx/docs/v1.hpp | 5 +++ .../include/mongocxx/v1/detail/postlude.hpp | 10 ++++++ .../include/mongocxx/v1/detail/prelude.hpp | 15 ++++++++ .../v_noabi/mongocxx/config/export.hpp | 26 ++++++++++++++ .../v_noabi/mongocxx/config/postlude.hpp | 8 ----- .../v_noabi/mongocxx/config/prelude.hpp | 14 -------- src/mongocxx/lib/CMakeLists.txt | 2 ++ .../lib/mongocxx/v1/config/export.cpp | 35 +++++++++++++++++++ .../v_noabi/mongocxx/config/export.cpp | 35 +++++++++++++++++++ src/mongocxx/test/CMakeLists.txt | 16 ++++----- 22 files changed, 276 insertions(+), 68 deletions(-) create mode 100644 src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/config/export.hpp create mode 100644 src/bsoncxx/lib/bsoncxx/v1/config/export.cpp create mode 100644 src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/config/export.cpp create mode 100644 src/mongocxx/include/mongocxx/v_noabi/mongocxx/config/export.hpp create mode 100644 src/mongocxx/lib/mongocxx/v1/config/export.cpp create mode 100644 src/mongocxx/lib/mongocxx/v_noabi/mongocxx/config/export.cpp diff --git a/src/bsoncxx/CMakeLists.txt b/src/bsoncxx/CMakeLists.txt index 7e8057fe13..1d4dcafe53 100644 --- a/src/bsoncxx/CMakeLists.txt +++ b/src/bsoncxx/CMakeLists.txt @@ -192,14 +192,14 @@ if(1) BASE_NAME BSONCXX_ABI EXPORT_MACRO_NAME BSONCXX_ABI_EXPORT DEPRECATED_MACRO_NAME BSONCXX_DEPRECATED - EXPORT_FILE_NAME ${PROJECT_BINARY_DIR}/lib/bsoncxx/v_noabi/bsoncxx/config/export.hpp + EXPORT_FILE_NAME ${PROJECT_BINARY_DIR}/lib/bsoncxx/v1/config/export.hpp STATIC_DEFINE BSONCXX_STATIC CUSTOM_CONTENT_FROM_VARIABLE bsoncxx_export_header_custom_content ) install(FILES - ${PROJECT_BINARY_DIR}/lib/bsoncxx/v_noabi/bsoncxx/config/export.hpp - DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/bsoncxx/v_noabi/bsoncxx/config + ${PROJECT_BINARY_DIR}/lib/bsoncxx/v1/config/export.hpp + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/bsoncxx/v1/config COMPONENT dev ) endfunction() diff --git a/src/bsoncxx/include/bsoncxx/docs/v1.hpp b/src/bsoncxx/include/bsoncxx/docs/v1.hpp index 6dc2a7ab8d..c4ebf982c1 100644 --- a/src/bsoncxx/include/bsoncxx/docs/v1.hpp +++ b/src/bsoncxx/include/bsoncxx/docs/v1.hpp @@ -28,6 +28,11 @@ /// Provides headers declaring entities in @ref bsoncxx::v1. /// +/// +/// @dir bsoncxx/v1/config +/// Provides headers related to bsoncxx library configuration. +/// + /// /// @dir bsoncxx/v1/detail /// Provides headers for internal use only. diff --git a/src/bsoncxx/include/bsoncxx/v1/detail/postlude.hpp b/src/bsoncxx/include/bsoncxx/v1/detail/postlude.hpp index 4f4ba7522e..f9c2fb9534 100644 --- a/src/bsoncxx/include/bsoncxx/v1/detail/postlude.hpp +++ b/src/bsoncxx/include/bsoncxx/v1/detail/postlude.hpp @@ -12,6 +12,16 @@ // See the License for the specific language governing permissions and // limitations under the License. +// bsoncxx/v1/config/export.hpp (generated by CMake) +#pragma pop_macro("BSONCXX_ABI_EXPORT_H") +#if !defined(BSONCXX_ABI_EXPORT_H) +#pragma pop_macro("BSONCXX_ABI_EXPORT") +#pragma pop_macro("BSONCXX_ABI_NO_EXPORT") +#pragma pop_macro("BSONCXX_ABI_CDECL") +#pragma pop_macro("BSONCXX_ABI_EXPORT_CDECL") +#pragma pop_macro("BSONCXX_DEPRECATED") +#endif + #if !defined(BSONCXX_PRIVATE_V1_INSIDE_MACRO_GUARD_SCOPE) #error "postlude header included without a matching prelude header" #endif diff --git a/src/bsoncxx/include/bsoncxx/v1/detail/prelude.hpp b/src/bsoncxx/include/bsoncxx/v1/detail/prelude.hpp index 3c1c364b0e..cb0eaefe0f 100644 --- a/src/bsoncxx/include/bsoncxx/v1/detail/prelude.hpp +++ b/src/bsoncxx/include/bsoncxx/v1/detail/prelude.hpp @@ -16,6 +16,21 @@ #undef BSONCXX_PRIVATE_V1_INSIDE_MACRO_GUARD_SCOPE #define BSONCXX_PRIVATE_V1_INSIDE_MACRO_GUARD_SCOPE +// bsoncxx/v1/config/export.hpp (generated by CMake) +#pragma push_macro("BSONCXX_ABI_EXPORT_H") +#if !defined(BSONCXX_ABI_EXPORT_H) +#pragma push_macro("BSONCXX_ABI_EXPORT") +#undef BSONCXX_ABI_EXPORT +#pragma push_macro("BSONCXX_ABI_NO_EXPORT") +#undef BSONCXX_ABI_NO_EXPORT +#pragma push_macro("BSONCXX_ABI_CDECL") +#undef BSONCXX_ABI_CDECL +#pragma push_macro("BSONCXX_ABI_EXPORT_CDECL") +#undef BSONCXX_ABI_EXPORT_CDECL +#pragma push_macro("BSONCXX_DEPRECATED") +#undef BSONCXX_DEPRECATED +#endif + /// /// @file /// The bsoncxx v1 macro guard prelude header. diff --git a/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/config/export.hpp b/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/config/export.hpp new file mode 100644 index 0000000000..c16d2abdb5 --- /dev/null +++ b/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/config/export.hpp @@ -0,0 +1,26 @@ +// 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. + +// For backward compatibility. +#include + +/// +/// @file +/// Provides macros to control the set of symbols exported in the ABI. +/// +/// @warning For internal use only! +/// +/// @par Includes +/// - @ref bsoncxx/v1/config/export.hpp +/// diff --git a/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/config/postlude.hpp b/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/config/postlude.hpp index a66730dc20..a2782b8292 100644 --- a/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/config/postlude.hpp +++ b/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/config/postlude.hpp @@ -28,14 +28,6 @@ #undef BSONCXX_VERSION_PATCH #pragma pop_macro("BSONCXX_VERSION_PATCH") -// export.hpp (generated by CMake) -#pragma pop_macro("BSONCXX_ABI_EXPORT_H") -#pragma pop_macro("BSONCXX_ABI_EXPORT") -#pragma pop_macro("BSONCXX_ABI_NO_EXPORT") -#pragma pop_macro("BSONCXX_ABI_CDECL") -#pragma pop_macro("BSONCXX_ABI_EXPORT_CDECL") -#pragma pop_macro("BSONCXX_DEPRECATED") - // prelude.hpp #undef BSONCXX_UNREACHABLE #pragma pop_macro("BSONCXX_UNREACHABLE") diff --git a/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/config/prelude.hpp b/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/config/prelude.hpp index 198583047d..1866b74ec1 100644 --- a/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/config/prelude.hpp +++ b/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/config/prelude.hpp @@ -76,20 +76,6 @@ #pragma push_macro("BSONCXX_VERSION_PATCH") #undef BSONCXX_VERSION_PATCH -// export.hpp (generated by CMake) -#pragma push_macro("BSONCXX_ABI_EXPORT_H") -#undef BSONCXX_ABI_EXPORT_H -#pragma push_macro("BSONCXX_ABI_EXPORT") -#undef BSONCXX_ABI_EXPORT -#pragma push_macro("BSONCXX_ABI_NO_EXPORT") -#undef BSONCXX_ABI_NO_EXPORT -#pragma push_macro("BSONCXX_ABI_CDECL") -#undef BSONCXX_ABI_CDECL -#pragma push_macro("BSONCXX_ABI_EXPORT_CDECL") -#undef BSONCXX_ABI_EXPORT_CDECL -#pragma push_macro("BSONCXX_DEPRECATED") -#undef BSONCXX_DEPRECATED - #include // #include diff --git a/src/bsoncxx/lib/CMakeLists.txt b/src/bsoncxx/lib/CMakeLists.txt index ef30509f06..1bbcb686f4 100644 --- a/src/bsoncxx/lib/CMakeLists.txt +++ b/src/bsoncxx/lib/CMakeLists.txt @@ -17,6 +17,7 @@ set(bsoncxx_sources_v_noabi bsoncxx/v_noabi/bsoncxx/array/value.cpp bsoncxx/v_noabi/bsoncxx/array/view.cpp bsoncxx/v_noabi/bsoncxx/builder/core.cpp + bsoncxx/v_noabi/bsoncxx/config/export.cpp bsoncxx/v_noabi/bsoncxx/decimal128.cpp bsoncxx/v_noabi/bsoncxx/document/element.cpp bsoncxx/v_noabi/bsoncxx/document/value.cpp @@ -34,6 +35,7 @@ set(bsoncxx_sources_v_noabi ) set(bsoncxx_sources_v1 + bsoncxx/v1/config/export.cpp bsoncxx/v1/detail/postlude.cpp bsoncxx/v1/detail/prelude.cpp ) diff --git a/src/bsoncxx/lib/bsoncxx/v1/config/export.cpp b/src/bsoncxx/lib/bsoncxx/v1/config/export.cpp new file mode 100644 index 0000000000..1c9849ac8a --- /dev/null +++ b/src/bsoncxx/lib/bsoncxx/v1/config/export.cpp @@ -0,0 +1,35 @@ +// 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 + +#if !defined(BSONCXX_ABI_EXPORT) +#error "bsoncxx/v1/config/export.hpp should define BSONCXX_ABI_EXPORT" +#endif + +#if !defined(BSONCXX_ABI_NO_EXPORT) +#error "bsoncxx/v1/config/export.hpp should define BSONCXX_ABI_NO_EXPORT" +#endif + +#if !defined(BSONCXX_DEPRECATED) +#error "bsoncxx/v1/config/export.hpp should define BSONCXX_DEPRECATED" +#endif + +#if !defined(BSONCXX_ABI_CDECL) +#error "bsoncxx/v1/config/export.hpp should define BSONCXX_ABI_CDECL" +#endif + +#if !defined(BSONCXX_ABI_EXPORT_CDECL) +#error "bsoncxx/v1/config/export.hpp should define BSONCXX_ABI_EXPORT_CDECL" +#endif diff --git a/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/config/export.cpp b/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/config/export.cpp new file mode 100644 index 0000000000..016f0f2396 --- /dev/null +++ b/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/config/export.cpp @@ -0,0 +1,35 @@ +// 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 + +#if !defined(BSONCXX_ABI_EXPORT) +#error "bsoncxx/v_noabi/bsoncxx/config/export.hpp should define BSONCXX_ABI_EXPORT" +#endif + +#if !defined(BSONCXX_ABI_NO_EXPORT) +#error "bsoncxx/v_noabi/bsoncxx/config/export.hpp should define BSONCXX_ABI_NO_EXPORT" +#endif + +#if !defined(BSONCXX_DEPRECATED) +#error "bsoncxx/v_noabi/bsoncxx/config/export.hpp should define BSONCXX_DEPRECATED" +#endif + +#if !defined(BSONCXX_ABI_CDECL) +#error "bsoncxx/v_noabi/bsoncxx/config/export.hpp should define BSONCXX_ABI_CDECL" +#endif + +#if !defined(BSONCXX_ABI_EXPORT_CDECL) +#error "bsoncxx/v_noabi/bsoncxx/config/export.hpp should define BSONCXX_ABI_EXPORT_CDECL" +#endif diff --git a/src/bsoncxx/test/CMakeLists.txt b/src/bsoncxx/test/CMakeLists.txt index 47c7c86c4b..c9b6779663 100644 --- a/src/bsoncxx/test/CMakeLists.txt +++ b/src/bsoncxx/test/CMakeLists.txt @@ -85,6 +85,13 @@ if(ENABLE_MACRO_GUARD_TESTS) PROJECT_NAME bsoncxx PROJECT_TEST_PROPERTIES_TARGET bsoncxx::test_properties GUARDED_MACROS + # bsoncxx/v1/config/export.hpp (generated by CMake) + BSONCXX_ABI_CDECL + BSONCXX_ABI_EXPORT + BSONCXX_ABI_EXPORT_CDECL + BSONCXX_ABI_NO_EXPORT + BSONCXX_DEPRECATED + # bsoncxx/v1/detail/prelude.hpp BSONCXX_PRIVATE_V1_INSIDE_MACRO_GUARD_SCOPE @@ -98,15 +105,6 @@ if(ENABLE_MACRO_GUARD_TESTS) BSONCXX_VERSION_MINOR BSONCXX_VERSION_PATCH - # export.hpp (generated by CMake) - BSONCXX_ABI_CDECL - BSONCXX_ABI_EXPORT - BSONCXX_ABI_EXPORT_TESTING - BSONCXX_ABI_NO_EXPORT - BSONCXX_ABI_EXPORT_CDECL - BSONCXX_ABI_EXPORT_CDECL_TESTING - BSONCXX_DEPRECATED - # prelude.hpp BSONCXX_UNREACHABLE diff --git a/src/mongocxx/CMakeLists.txt b/src/mongocxx/CMakeLists.txt index 0509ecb6cc..c06ace2915 100644 --- a/src/mongocxx/CMakeLists.txt +++ b/src/mongocxx/CMakeLists.txt @@ -167,14 +167,14 @@ if(1) BASE_NAME MONGOCXX_ABI EXPORT_MACRO_NAME MONGOCXX_ABI_EXPORT DEPRECATED_MACRO_NAME MONGOCXX_DEPRECATED - EXPORT_FILE_NAME ${PROJECT_BINARY_DIR}/lib/mongocxx/v_noabi/mongocxx/config/export.hpp + EXPORT_FILE_NAME ${PROJECT_BINARY_DIR}/lib/mongocxx/v1/config/export.hpp STATIC_DEFINE MONGOCXX_STATIC CUSTOM_CONTENT_FROM_VARIABLE mongocxx_export_header_custom_content ) install(FILES - ${PROJECT_BINARY_DIR}/lib/mongocxx/v_noabi/mongocxx/config/export.hpp - DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/mongocxx/v_noabi/mongocxx/config + ${PROJECT_BINARY_DIR}/lib/mongocxx/v1/config/export.hpp + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/mongocxx/v1/config COMPONENT dev ) endfunction() diff --git a/src/mongocxx/include/mongocxx/docs/v1.hpp b/src/mongocxx/include/mongocxx/docs/v1.hpp index 877ad461bc..56c1b74f7c 100644 --- a/src/mongocxx/include/mongocxx/docs/v1.hpp +++ b/src/mongocxx/include/mongocxx/docs/v1.hpp @@ -28,6 +28,11 @@ /// Provides headers declaring entities in @ref mongocxx::v1. /// +/// +/// @dir mongocxx/v1/config +/// Provides headers related to mongocxx library configuration. +/// + /// /// @dir mongocxx/v1/detail /// Provides headers for internal use only. diff --git a/src/mongocxx/include/mongocxx/v1/detail/postlude.hpp b/src/mongocxx/include/mongocxx/v1/detail/postlude.hpp index 446c193977..8c82db872b 100644 --- a/src/mongocxx/include/mongocxx/v1/detail/postlude.hpp +++ b/src/mongocxx/include/mongocxx/v1/detail/postlude.hpp @@ -12,6 +12,16 @@ // See the License for the specific language governing permissions and // limitations under the License. +// mongocxx/v1/config/export.hpp (generated by CMake) +#pragma pop_macro("MONGOCXX_ABI_EXPORT_H") +#if !defined(MONGOCXX_ABI_EXPORT_H) +#pragma pop_macro("MONGOCXX_ABI_EXPORT") +#pragma pop_macro("MONGOCXX_ABI_NO_EXPORT") +#pragma pop_macro("MONGOCXX_ABI_CDECL") +#pragma pop_macro("MONGOCXX_ABI_EXPORT_CDECL") +#pragma pop_macro("MONGOCXX_DEPRECATED") +#endif + #if !defined(MONGOCXX_PRIVATE_V1_INSIDE_MACRO_GUARD_SCOPE) #error "postlude header included without a matching prelude header" #endif diff --git a/src/mongocxx/include/mongocxx/v1/detail/prelude.hpp b/src/mongocxx/include/mongocxx/v1/detail/prelude.hpp index 31469b4390..7e8fa83265 100644 --- a/src/mongocxx/include/mongocxx/v1/detail/prelude.hpp +++ b/src/mongocxx/include/mongocxx/v1/detail/prelude.hpp @@ -16,6 +16,21 @@ #undef MONGOCXX_PRIVATE_V1_INSIDE_MACRO_GUARD_SCOPE #define MONGOCXX_PRIVATE_V1_INSIDE_MACRO_GUARD_SCOPE +// mongocxx/v1/config/export.hpp (generated by CMake) +#pragma push_macro("MONGOCXX_ABI_EXPORT_H") +#if !defined(MONGOCXX_ABI_EXPORT_H) +#pragma push_macro("MONGOCXX_ABI_EXPORT") +#undef MONGOCXX_ABI_EXPORT +#pragma push_macro("MONGOCXX_ABI_NO_EXPORT") +#undef MONGOCXX_ABI_NO_EXPORT +#pragma push_macro("MONGOCXX_ABI_CDECL") +#undef MONGOCXX_ABI_CDECL +#pragma push_macro("MONGOCXX_ABI_EXPORT_CDECL") +#undef MONGOCXX_ABI_EXPORT_CDECL +#pragma push_macro("MONGOCXX_DEPRECATED") +#undef MONGOCXX_DEPRECATED +#endif + /// /// @file /// The mongocxx v1 macro guard prelude header. diff --git a/src/mongocxx/include/mongocxx/v_noabi/mongocxx/config/export.hpp b/src/mongocxx/include/mongocxx/v_noabi/mongocxx/config/export.hpp new file mode 100644 index 0000000000..75bbe94bee --- /dev/null +++ b/src/mongocxx/include/mongocxx/v_noabi/mongocxx/config/export.hpp @@ -0,0 +1,26 @@ +// 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. + +// For backward compatibility. +#include + +/// +/// @file +/// Provides macros to control the set of symbols exported in the ABI. +/// +/// @warning For internal use only! +/// +/// @par Includes +/// - @ref mongocxx/v1/config/export.hpp +/// diff --git a/src/mongocxx/include/mongocxx/v_noabi/mongocxx/config/postlude.hpp b/src/mongocxx/include/mongocxx/v_noabi/mongocxx/config/postlude.hpp index 6f6839e0ce..bdc89bb476 100644 --- a/src/mongocxx/include/mongocxx/v_noabi/mongocxx/config/postlude.hpp +++ b/src/mongocxx/include/mongocxx/v_noabi/mongocxx/config/postlude.hpp @@ -24,14 +24,6 @@ #undef MONGOCXX_VERSION_PATCH #pragma pop_macro("MONGOCXX_VERSION_PATCH") -// export.hpp (generated by CMake) -#pragma pop_macro("MONGOCXX_ABI_EXPORT_H") -#pragma pop_macro("MONGOCXX_ABI_EXPORT") -#pragma pop_macro("MONGOCXX_ABI_NO_EXPORT") -#pragma pop_macro("MONGOCXX_ABI_CDECL") -#pragma pop_macro("MONGOCXX_ABI_EXPORT_CDECL") -#pragma pop_macro("MONGOCXX_DEPRECATED") - // prelude.hpp #undef MONGOCXX_UNREACHABLE #pragma pop_macro("MONGOCXX_UNREACHABLE") diff --git a/src/mongocxx/include/mongocxx/v_noabi/mongocxx/config/prelude.hpp b/src/mongocxx/include/mongocxx/v_noabi/mongocxx/config/prelude.hpp index df196e1640..529ceeee16 100644 --- a/src/mongocxx/include/mongocxx/v_noabi/mongocxx/config/prelude.hpp +++ b/src/mongocxx/include/mongocxx/v_noabi/mongocxx/config/prelude.hpp @@ -26,20 +26,6 @@ #pragma push_macro("MONGOCXX_VERSION_PATCH") #undef MONGOCXX_VERSION_PATCH -// export.hpp (generated by CMake) -#pragma push_macro("MONGOCXX_ABI_EXPORT_H") -#undef MONGOCXX_ABI_EXPORT_H -#pragma push_macro("MONGOCXX_ABI_EXPORT") -#undef MONGOCXX_ABI_EXPORT -#pragma push_macro("MONGOCXX_ABI_NO_EXPORT") -#undef MONGOCXX_ABI_NO_EXPORT -#pragma push_macro("MONGOCXX_ABI_CDECL") -#undef MONGOCXX_ABI_CDECL -#pragma push_macro("MONGOCXX_ABI_EXPORT_CDECL") -#undef MONGOCXX_ABI_EXPORT_CDECL -#pragma push_macro("MONGOCXX_DEPRECATED") -#undef MONGOCXX_DEPRECATED - #include #include #include diff --git a/src/mongocxx/lib/CMakeLists.txt b/src/mongocxx/lib/CMakeLists.txt index 1d37012008..7c33431925 100644 --- a/src/mongocxx/lib/CMakeLists.txt +++ b/src/mongocxx/lib/CMakeLists.txt @@ -19,6 +19,7 @@ set(mongocxx_sources_v_noabi mongocxx/v_noabi/mongocxx/client_session.cpp mongocxx/v_noabi/mongocxx/client.cpp mongocxx/v_noabi/mongocxx/collection.cpp + mongocxx/v_noabi/mongocxx/config/export.cpp mongocxx/v_noabi/mongocxx/cursor.cpp mongocxx/v_noabi/mongocxx/database.cpp mongocxx/v_noabi/mongocxx/events/command_failed_event.cpp @@ -115,6 +116,7 @@ set(mongocxx_sources_v_noabi ) set(mongocxx_sources_v1 + mongocxx/v1/config/export.cpp mongocxx/v1/detail/postlude.cpp mongocxx/v1/detail/prelude.cpp ) diff --git a/src/mongocxx/lib/mongocxx/v1/config/export.cpp b/src/mongocxx/lib/mongocxx/v1/config/export.cpp new file mode 100644 index 0000000000..d72c78ec49 --- /dev/null +++ b/src/mongocxx/lib/mongocxx/v1/config/export.cpp @@ -0,0 +1,35 @@ +// 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 + +#if !defined(MONGOCXX_ABI_EXPORT) +#error "mongocxx/v1/config/export.hpp should define MONGOCXX_ABI_EXPORT" +#endif + +#if !defined(MONGOCXX_ABI_NO_EXPORT) +#error "mongocxx/v1/config/export.hpp should define MONGOCXX_ABI_NO_EXPORT" +#endif + +#if !defined(MONGOCXX_DEPRECATED) +#error "mongocxx/v1/config/export.hpp should define MONGOCXX_DEPRECATED" +#endif + +#if !defined(MONGOCXX_ABI_CDECL) +#error "mongocxx/v1/config/export.hpp should define MONGOCXX_ABI_CDECL" +#endif + +#if !defined(MONGOCXX_ABI_EXPORT_CDECL) +#error "mongocxx/v1/config/export.hpp should define MONGOCXX_ABI_EXPORT_CDECL" +#endif diff --git a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/config/export.cpp b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/config/export.cpp new file mode 100644 index 0000000000..a4343427ae --- /dev/null +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/config/export.cpp @@ -0,0 +1,35 @@ +// 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 + +#if !defined(MONGOCXX_ABI_EXPORT) +#error "mongocxx/v_noabi/mongocxx/config/export.hpp should define MONGOCXX_ABI_EXPORT" +#endif + +#if !defined(MONGOCXX_ABI_NO_EXPORT) +#error "mongocxx/v_noabi/mongocxx/config/export.hpp should define MONGOCXX_ABI_NO_EXPORT" +#endif + +#if !defined(MONGOCXX_DEPRECATED) +#error "mongocxx/v_noabi/mongocxx/config/export.hpp should define MONGOCXX_DEPRECATED" +#endif + +#if !defined(MONGOCXX_ABI_CDECL) +#error "mongocxx/v_noabi/mongocxx/config/export.hpp should define MONGOCXX_ABI_CDECL" +#endif + +#if !defined(MONGOCXX_ABI_EXPORT_CDECL) +#error "mongocxx/v_noabi/mongocxx/config/export.hpp should define MONGOCXX_ABI_EXPORT_CDECL" +#endif diff --git a/src/mongocxx/test/CMakeLists.txt b/src/mongocxx/test/CMakeLists.txt index 964242e113..07750502b9 100644 --- a/src/mongocxx/test/CMakeLists.txt +++ b/src/mongocxx/test/CMakeLists.txt @@ -292,6 +292,13 @@ if(ENABLE_MACRO_GUARD_TESTS) PROJECT_NAME mongocxx PROJECT_TEST_PROPERTIES_TARGET mongocxx::test_properties GUARDED_MACROS + # mongocxx/v1/config/export.hpp (generated by CMake) + MONGOCXX_ABI_CDECL + MONGOCXX_ABI_EXPORT + MONGOCXX_ABI_EXPORT_CDECL + MONGOCXX_ABI_NO_EXPORT + MONGOCXX_DEPRECATED + # mongocxx/v1/detail/prelude.hpp MONGOCXX_PRIVATE_V1_INSIDE_MACRO_GUARD_SCOPE @@ -302,15 +309,6 @@ if(ENABLE_MACRO_GUARD_TESTS) MONGOCXX_VERSION_MINOR MONGOCXX_VERSION_PATCH - # export.hpp (generated by CMake) - MONGOCXX_ABI_CDECL - MONGOCXX_ABI_EXPORT - MONGOCXX_ABI_EXPORT_TESTING - MONGOCXX_ABI_EXPORT_CDECL - MONGOCXX_ABI_EXPORT_CDECL_TESTING - MONGOCXX_ABI_NO_EXPORT - MONGOCXX_DEPRECATED - # prelude.hpp MONGOCXX_UNREACHABLE From 90dc0756373aa20a1d57f109182c86a27ec1d5c7 Mon Sep 17 00:00:00 2001 From: Ezra Chung Date: Fri, 10 Jan 2025 15:12:08 -0600 Subject: [PATCH 06/19] v1 <- v_noabi: config.hpp --- .../lib/bsoncxx/{v_noabi/bsoncxx => v1}/config/config.hpp.in | 0 .../lib/mongocxx/{v_noabi/mongocxx => v1}/config/config.hpp.in | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename src/bsoncxx/lib/bsoncxx/{v_noabi/bsoncxx => v1}/config/config.hpp.in (100%) rename src/mongocxx/lib/mongocxx/{v_noabi/mongocxx => v1}/config/config.hpp.in (100%) diff --git a/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/config/config.hpp.in b/src/bsoncxx/lib/bsoncxx/v1/config/config.hpp.in similarity index 100% rename from src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/config/config.hpp.in rename to src/bsoncxx/lib/bsoncxx/v1/config/config.hpp.in diff --git a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/config/config.hpp.in b/src/mongocxx/lib/mongocxx/v1/config/config.hpp.in similarity index 100% rename from src/mongocxx/lib/mongocxx/v_noabi/mongocxx/config/config.hpp.in rename to src/mongocxx/lib/mongocxx/v1/config/config.hpp.in From d6ffdb9c65f2de33b45df1cfcc0b0e5f1d873fda Mon Sep 17 00:00:00 2001 From: Ezra Chung Date: Fri, 10 Jan 2025 15:12:09 -0600 Subject: [PATCH 07/19] v1: config.hpp --- .../include/bsoncxx/v1/detail/postlude.hpp | 7 ++++++ .../include/bsoncxx/v1/detail/prelude.hpp | 9 +++++++ .../bsoncxx/v_noabi/bsoncxx/config/config.hpp | 24 +++++++++++++++++++ .../v_noabi/bsoncxx/config/postlude.hpp | 6 ----- .../v_noabi/bsoncxx/config/prelude.hpp | 6 ----- src/bsoncxx/lib/CMakeLists.txt | 15 ++++++++---- src/bsoncxx/lib/bsoncxx/v1/config/config.cpp | 19 +++++++++++++++ .../lib/bsoncxx/v1/config/config.hpp.in | 13 ++++++---- .../bsoncxx/v_noabi/bsoncxx/config/config.cpp | 19 +++++++++++++++ src/bsoncxx/test/CMakeLists.txt | 8 +++---- .../v_noabi/mongocxx/config/config.hpp | 24 +++++++++++++++++++ src/mongocxx/lib/CMakeLists.txt | 15 ++++++++---- .../lib/mongocxx/v1/config/config.cpp | 15 ++++++++++++ .../lib/mongocxx/v1/config/config.hpp.in | 2 -- .../v_noabi/mongocxx/config/config.cpp | 15 ++++++++++++ 15 files changed, 166 insertions(+), 31 deletions(-) create mode 100644 src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/config/config.hpp create mode 100644 src/bsoncxx/lib/bsoncxx/v1/config/config.cpp create mode 100644 src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/config/config.cpp create mode 100644 src/mongocxx/include/mongocxx/v_noabi/mongocxx/config/config.hpp create mode 100644 src/mongocxx/lib/mongocxx/v1/config/config.cpp create mode 100644 src/mongocxx/lib/mongocxx/v_noabi/mongocxx/config/config.cpp diff --git a/src/bsoncxx/include/bsoncxx/v1/detail/postlude.hpp b/src/bsoncxx/include/bsoncxx/v1/detail/postlude.hpp index f9c2fb9534..2b3ca4dc13 100644 --- a/src/bsoncxx/include/bsoncxx/v1/detail/postlude.hpp +++ b/src/bsoncxx/include/bsoncxx/v1/detail/postlude.hpp @@ -12,6 +12,13 @@ // See the License for the specific language governing permissions and // limitations under the License. +// bsoncxx/v1/config/config.hpp (generated by CMake) +#pragma pop_macro("BSONCXX_V1_CONFIG_CONFIG_HPP") +#if !defined(BSONCXX_V1_CONFIG_CONFIG_HPP) +#pragma pop_macro("BSONCXX_POLY_USE_IMPLS") +#pragma pop_macro("BSONCXX_POLY_USE_STD") +#endif + // bsoncxx/v1/config/export.hpp (generated by CMake) #pragma pop_macro("BSONCXX_ABI_EXPORT_H") #if !defined(BSONCXX_ABI_EXPORT_H) diff --git a/src/bsoncxx/include/bsoncxx/v1/detail/prelude.hpp b/src/bsoncxx/include/bsoncxx/v1/detail/prelude.hpp index cb0eaefe0f..e8df0c26e3 100644 --- a/src/bsoncxx/include/bsoncxx/v1/detail/prelude.hpp +++ b/src/bsoncxx/include/bsoncxx/v1/detail/prelude.hpp @@ -16,6 +16,15 @@ #undef BSONCXX_PRIVATE_V1_INSIDE_MACRO_GUARD_SCOPE #define BSONCXX_PRIVATE_V1_INSIDE_MACRO_GUARD_SCOPE +// bsoncxx/v1/config/config.hpp (generated by CMake) +#pragma push_macro("BSONCXX_V1_CONFIG_CONFIG_HPP") +#if !defined(BSONCXX_V1_CONFIG_CONFIG_HPP) +#pragma push_macro("BSONCXX_POLY_USE_IMPLS") +#undef BSONCXX_POLY_USE_IMPLS +#pragma push_macro("BSONCXX_POLY_USE_STD") +#undef BSONCXX_POLY_USE_STD +#endif + // bsoncxx/v1/config/export.hpp (generated by CMake) #pragma push_macro("BSONCXX_ABI_EXPORT_H") #if !defined(BSONCXX_ABI_EXPORT_H) diff --git a/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/config/config.hpp b/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/config/config.hpp new file mode 100644 index 0000000000..895ac5aaee --- /dev/null +++ b/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/config/config.hpp @@ -0,0 +1,24 @@ +// 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. + +// For backward compatibility. +#include + +/// +/// @file +/// Provides macros describing the bsoncxx library configuration. +/// +/// @par Includes +/// - @ref bsoncxx/v1/config/config.hpp +/// diff --git a/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/config/postlude.hpp b/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/config/postlude.hpp index a2782b8292..2cf5c59460 100644 --- a/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/config/postlude.hpp +++ b/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/config/postlude.hpp @@ -12,12 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -// config.hpp (generated by CMake) -#undef BSONCXX_POLY_USE_IMPLS -#pragma pop_macro("BSONCXX_POLY_USE_IMPLS") -#undef BSONCXX_POLY_USE_STD -#pragma pop_macro("BSONCXX_POLY_USE_STD") - // version.hpp (generated by CMake) #undef BSONCXX_VERSION_EXTRA #pragma pop_macro("BSONCXX_VERSION_EXTRA") diff --git a/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/config/prelude.hpp b/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/config/prelude.hpp index 1866b74ec1..73ed708be5 100644 --- a/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/config/prelude.hpp +++ b/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/config/prelude.hpp @@ -60,12 +60,6 @@ #pragma push_macro("BSONCXX_IF_GNU_LIKE") #undef BSONCXX_IF_GNU_LIKE -// config.hpp (generated by CMake) -#pragma push_macro("BSONCXX_POLY_USE_IMPLS") -#undef BSONCXX_POLY_USE_IMPLS -#pragma push_macro("BSONCXX_POLY_USE_STD") -#undef BSONCXX_POLY_USE_STD - // version.hpp (generated by CMake) #pragma push_macro("BSONCXX_VERSION_EXTRA") #undef BSONCXX_VERSION_EXTRA diff --git a/src/bsoncxx/lib/CMakeLists.txt b/src/bsoncxx/lib/CMakeLists.txt index 1bbcb686f4..9776e628ff 100644 --- a/src/bsoncxx/lib/CMakeLists.txt +++ b/src/bsoncxx/lib/CMakeLists.txt @@ -17,6 +17,7 @@ set(bsoncxx_sources_v_noabi bsoncxx/v_noabi/bsoncxx/array/value.cpp bsoncxx/v_noabi/bsoncxx/array/view.cpp bsoncxx/v_noabi/bsoncxx/builder/core.cpp + bsoncxx/v_noabi/bsoncxx/config/config.cpp bsoncxx/v_noabi/bsoncxx/config/export.cpp bsoncxx/v_noabi/bsoncxx/decimal128.cpp bsoncxx/v_noabi/bsoncxx/document/element.cpp @@ -35,6 +36,7 @@ set(bsoncxx_sources_v_noabi ) set(bsoncxx_sources_v1 + bsoncxx/v1/config/config.cpp bsoncxx/v1/config/export.cpp bsoncxx/v1/detail/postlude.cpp bsoncxx/v1/detail/prelude.cpp @@ -58,8 +60,8 @@ endif() # Generate and install public headers. if(1) configure_file( - bsoncxx/v_noabi/bsoncxx/config/config.hpp.in - bsoncxx/v_noabi/bsoncxx/config/config.hpp + bsoncxx/v1/config/config.hpp.in + bsoncxx/v1/config/config.hpp ) configure_file( @@ -68,18 +70,22 @@ if(1) ) install(FILES - ${CMAKE_CURRENT_BINARY_DIR}/bsoncxx/v_noabi/bsoncxx/config/config.hpp ${CMAKE_CURRENT_BINARY_DIR}/bsoncxx/v_noabi/bsoncxx/config/version.hpp DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/bsoncxx/v_noabi/bsoncxx/config COMPONENT dev ) + + install(FILES + ${CMAKE_CURRENT_BINARY_DIR}/bsoncxx/v1/config/config.hpp + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/bsoncxx/v1/config + COMPONENT dev + ) endif() set_dist_list(src_bsoncxx_lib_DIST CMakeLists.txt ${bsoncxx_sources_v_noabi} ${bsoncxx_sources_v1} - bsoncxx/v_noabi/bsoncxx/config/config.hpp.in 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 @@ -94,4 +100,5 @@ set_dist_list(src_bsoncxx_lib_DIST 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/v1/config/config.hpp.in ) diff --git a/src/bsoncxx/lib/bsoncxx/v1/config/config.cpp b/src/bsoncxx/lib/bsoncxx/v1/config/config.cpp new file mode 100644 index 0000000000..ba5df5f259 --- /dev/null +++ b/src/bsoncxx/lib/bsoncxx/v1/config/config.cpp @@ -0,0 +1,19 @@ +// 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 + +#if !defined(BSONCXX_POLY_USE_IMPLS) && !defined(BSONCXX_POLY_USE_STD) +#error "bsoncxx/v1/config/config.hpp should define a polyfill library macro" +#endif diff --git a/src/bsoncxx/lib/bsoncxx/v1/config/config.hpp.in b/src/bsoncxx/lib/bsoncxx/v1/config/config.hpp.in index 3358ecb03c..c5b962191c 100644 --- a/src/bsoncxx/lib/bsoncxx/v1/config/config.hpp.in +++ b/src/bsoncxx/lib/bsoncxx/v1/config/config.hpp.in @@ -12,6 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. +#if !defined(BSONCXX_V1_CONFIG_CONFIG_HPP) +#define BSONCXX_V1_CONFIG_CONFIG_HPP + #cmakedefine BSONCXX_POLY_USE_IMPLS #cmakedefine BSONCXX_POLY_USE_STD @@ -19,20 +22,18 @@ /// @file /// Provides macros describing the bsoncxx library configuration. /// -/// @warning This header is not standalone includable! -/// #if defined(BSONCXX_PRIVATE_DOXYGEN_PREPROCESSOR) #if !defined(BSONCXX_POLY_USE_IMPLS) #define BSONCXX_POLY_USE_IMPLS -#endif // !defined(BSONCXX_POLY_USE_IMPLS) +#endif // !defined(BSONCXX_POLY_USE_IMPLS) #if !defined(BSONCXX_POLY_USE_STD) #define BSONCXX_POLY_USE_STD -#endif // !defined(BSONCXX_POLY_USE_IMPLS) +#endif // !defined(BSONCXX_POLY_USE_IMPLS) -#endif // BSONCXX_PRIVATE_DOXYGEN_PREPROCESSOR +#endif // BSONCXX_PRIVATE_DOXYGEN_PREPROCESSOR /// /// @def BSONCXX_POLY_USE_IMPLS @@ -43,3 +44,5 @@ /// @def BSONCXX_POLY_USE_STD /// Defined when configured to use the C++ standard library for C++17 features. /// + +#endif // !defined(BSONCXX_V1_CONFIG_CONFIG_HPP) diff --git a/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/config/config.cpp b/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/config/config.cpp new file mode 100644 index 0000000000..9ada65b3ea --- /dev/null +++ b/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/config/config.cpp @@ -0,0 +1,19 @@ +// 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 + +#if !defined(BSONCXX_POLY_USE_IMPLS) && !defined(BSONCXX_POLY_USE_STD) +#error "bsoncxx/v_noabi/bsoncxx/config/config.hpp should define a polyfill library macro" +#endif diff --git a/src/bsoncxx/test/CMakeLists.txt b/src/bsoncxx/test/CMakeLists.txt index c9b6779663..c22dbc9989 100644 --- a/src/bsoncxx/test/CMakeLists.txt +++ b/src/bsoncxx/test/CMakeLists.txt @@ -85,6 +85,10 @@ if(ENABLE_MACRO_GUARD_TESTS) PROJECT_NAME bsoncxx PROJECT_TEST_PROPERTIES_TARGET bsoncxx::test_properties GUARDED_MACROS + # bsoncxx/v1/config/config.hpp (generated by CMake) + BSONCXX_POLY_USE_IMPLS + BSONCXX_POLY_USE_STD + # bsoncxx/v1/config/export.hpp (generated by CMake) BSONCXX_ABI_CDECL BSONCXX_ABI_EXPORT @@ -95,10 +99,6 @@ if(ENABLE_MACRO_GUARD_TESTS) # bsoncxx/v1/detail/prelude.hpp BSONCXX_PRIVATE_V1_INSIDE_MACRO_GUARD_SCOPE - # config.hpp (generated by CMake) - BSONCXX_POLY_USE_IMPLS - BSONCXX_POLY_USE_STD - # version.hpp (generated by CMake) BSONCXX_VERSION_EXTRA BSONCXX_VERSION_MAJOR diff --git a/src/mongocxx/include/mongocxx/v_noabi/mongocxx/config/config.hpp b/src/mongocxx/include/mongocxx/v_noabi/mongocxx/config/config.hpp new file mode 100644 index 0000000000..1dc5b27aa6 --- /dev/null +++ b/src/mongocxx/include/mongocxx/v_noabi/mongocxx/config/config.hpp @@ -0,0 +1,24 @@ +// 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. + +// For backward compatibility. +#include + +/// +/// @file +/// Provides macros describing the mongocxx library configuration. +/// +/// @par Includes +/// - @ref mongocxx/v1/config/config.hpp +/// diff --git a/src/mongocxx/lib/CMakeLists.txt b/src/mongocxx/lib/CMakeLists.txt index 7c33431925..6f42d38337 100644 --- a/src/mongocxx/lib/CMakeLists.txt +++ b/src/mongocxx/lib/CMakeLists.txt @@ -19,6 +19,7 @@ set(mongocxx_sources_v_noabi mongocxx/v_noabi/mongocxx/client_session.cpp mongocxx/v_noabi/mongocxx/client.cpp mongocxx/v_noabi/mongocxx/collection.cpp + mongocxx/v_noabi/mongocxx/config/config.cpp mongocxx/v_noabi/mongocxx/config/export.cpp mongocxx/v_noabi/mongocxx/cursor.cpp mongocxx/v_noabi/mongocxx/database.cpp @@ -116,6 +117,7 @@ set(mongocxx_sources_v_noabi ) set(mongocxx_sources_v1 + mongocxx/v1/config/config.cpp mongocxx/v1/config/export.cpp mongocxx/v1/detail/postlude.cpp mongocxx/v1/detail/prelude.cpp @@ -156,23 +158,27 @@ if(1) ) configure_file( - mongocxx/v_noabi/mongocxx/config/config.hpp.in - mongocxx/v_noabi/mongocxx/config/config.hpp + mongocxx/v1/config/config.hpp.in + mongocxx/v1/config/config.hpp ) install(FILES - ${CMAKE_CURRENT_BINARY_DIR}/mongocxx/v_noabi/mongocxx/config/config.hpp ${CMAKE_CURRENT_BINARY_DIR}/mongocxx/v_noabi/mongocxx/config/version.hpp DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/mongocxx/v_noabi/mongocxx/config COMPONENT dev ) + + install(FILES + ${CMAKE_CURRENT_BINARY_DIR}/mongocxx/v1/config/config.hpp + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/mongocxx/v1/config + COMPONENT dev + ) endif() set_dist_list(src_mongocxx_lib_DIST CMakeLists.txt ${mongocxx_sources_v_noabi} ${mongocxx_sources_v1} - mongocxx/v_noabi/mongocxx/config/config.hpp.in 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 @@ -211,4 +217,5 @@ set_dist_list(src_mongocxx_lib_DIST 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/v1/config/config.hpp.in ) diff --git a/src/mongocxx/lib/mongocxx/v1/config/config.cpp b/src/mongocxx/lib/mongocxx/v1/config/config.cpp new file mode 100644 index 0000000000..a4c3009f03 --- /dev/null +++ b/src/mongocxx/lib/mongocxx/v1/config/config.cpp @@ -0,0 +1,15 @@ +// 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 diff --git a/src/mongocxx/lib/mongocxx/v1/config/config.hpp.in b/src/mongocxx/lib/mongocxx/v1/config/config.hpp.in index 4b5a81c39c..eb1885fbc3 100644 --- a/src/mongocxx/lib/mongocxx/v1/config/config.hpp.in +++ b/src/mongocxx/lib/mongocxx/v1/config/config.hpp.in @@ -16,5 +16,3 @@ /// @file /// Provides macros describing the mongocxx library configuration. /// -/// @warning This header is not standalone includable! -/// diff --git a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/config/config.cpp b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/config/config.cpp new file mode 100644 index 0000000000..77f5421de0 --- /dev/null +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/config/config.cpp @@ -0,0 +1,15 @@ +// 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 From ea6e914bdd9580c4bdb9c3f22661e3c593edeac2 Mon Sep 17 00:00:00 2001 From: Ezra Chung Date: Fri, 10 Jan 2025 15:12:09 -0600 Subject: [PATCH 08/19] v1 <- v_noabi: version.hpp --- .../lib/bsoncxx/{v_noabi/bsoncxx => v1}/config/version.hpp.in | 0 .../lib/mongocxx/{v_noabi/mongocxx => v1}/config/version.hpp.in | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename src/bsoncxx/lib/bsoncxx/{v_noabi/bsoncxx => v1}/config/version.hpp.in (100%) rename src/mongocxx/lib/mongocxx/{v_noabi/mongocxx => v1}/config/version.hpp.in (100%) diff --git a/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/config/version.hpp.in b/src/bsoncxx/lib/bsoncxx/v1/config/version.hpp.in similarity index 100% rename from src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/config/version.hpp.in rename to src/bsoncxx/lib/bsoncxx/v1/config/version.hpp.in diff --git a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/config/version.hpp.in b/src/mongocxx/lib/mongocxx/v1/config/version.hpp.in similarity index 100% rename from src/mongocxx/lib/mongocxx/v_noabi/mongocxx/config/version.hpp.in rename to src/mongocxx/lib/mongocxx/v1/config/version.hpp.in From 1a9e26d383688baf48b68b450475c8172b6d92ed Mon Sep 17 00:00:00 2001 From: Ezra Chung Date: Fri, 10 Jan 2025 15:12:09 -0600 Subject: [PATCH 09/19] v1: version.hpp --- .../include/bsoncxx/v1/detail/postlude.hpp | 10 ++++++ .../include/bsoncxx/v1/detail/prelude.hpp | 15 +++++++++ .../v_noabi/bsoncxx/config/postlude.hpp | 10 ------ .../v_noabi/bsoncxx/config/prelude.hpp | 10 ------ .../v_noabi/bsoncxx/config/version.hpp | 24 ++++++++++++++ src/bsoncxx/lib/CMakeLists.txt | 15 ++++----- src/bsoncxx/lib/bsoncxx/v1/config/version.cpp | 31 +++++++++++++++++++ .../lib/bsoncxx/v1/config/version.hpp.in | 7 +++-- .../v_noabi/bsoncxx/config/version.cpp | 31 +++++++++++++++++++ src/bsoncxx/test/CMakeLists.txt | 9 +++--- .../include/mongocxx/v1/detail/postlude.hpp | 10 ++++++ .../include/mongocxx/v1/detail/prelude.hpp | 15 +++++++++ .../v_noabi/mongocxx/config/postlude.hpp | 12 ------- .../v_noabi/mongocxx/config/prelude.hpp | 12 ------- .../v_noabi/mongocxx/config/version.hpp | 24 ++++++++++++++ src/mongocxx/lib/CMakeLists.txt | 17 +++++----- .../lib/mongocxx/v1/config/version.cpp | 31 +++++++++++++++++++ .../lib/mongocxx/v1/config/version.hpp.in | 5 +++ .../v_noabi/mongocxx/config/version.cpp | 31 +++++++++++++++++++ src/mongocxx/test/CMakeLists.txt | 8 ++--- 20 files changed, 254 insertions(+), 73 deletions(-) create mode 100644 src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/config/version.hpp create mode 100644 src/bsoncxx/lib/bsoncxx/v1/config/version.cpp create mode 100644 src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/config/version.cpp create mode 100644 src/mongocxx/include/mongocxx/v_noabi/mongocxx/config/version.hpp create mode 100644 src/mongocxx/lib/mongocxx/v1/config/version.cpp create mode 100644 src/mongocxx/lib/mongocxx/v_noabi/mongocxx/config/version.cpp diff --git a/src/bsoncxx/include/bsoncxx/v1/detail/postlude.hpp b/src/bsoncxx/include/bsoncxx/v1/detail/postlude.hpp index 2b3ca4dc13..0860630288 100644 --- a/src/bsoncxx/include/bsoncxx/v1/detail/postlude.hpp +++ b/src/bsoncxx/include/bsoncxx/v1/detail/postlude.hpp @@ -29,6 +29,16 @@ #pragma pop_macro("BSONCXX_DEPRECATED") #endif +// bsoncxx/v1/config/version.hpp (generated by CMake) +#pragma pop_macro("BSONCXX_V1_CONFIG_VERSION_HPP") +#if !defined(BSONCXX_V1_CONFIG_VERSION_HPP) +#pragma pop_macro("BSONCXX_VERSION_STRING") +#pragma pop_macro("BSONCXX_VERSION_MAJOR") +#pragma pop_macro("BSONCXX_VERSION_MINOR") +#pragma pop_macro("BSONCXX_VERSION_PATCH") +#pragma pop_macro("BSONCXX_VERSION_EXTRA") +#endif + #if !defined(BSONCXX_PRIVATE_V1_INSIDE_MACRO_GUARD_SCOPE) #error "postlude header included without a matching prelude header" #endif diff --git a/src/bsoncxx/include/bsoncxx/v1/detail/prelude.hpp b/src/bsoncxx/include/bsoncxx/v1/detail/prelude.hpp index e8df0c26e3..1a1863d309 100644 --- a/src/bsoncxx/include/bsoncxx/v1/detail/prelude.hpp +++ b/src/bsoncxx/include/bsoncxx/v1/detail/prelude.hpp @@ -40,6 +40,21 @@ #undef BSONCXX_DEPRECATED #endif +// bsoncxx/v1/config/version.hpp (generated by CMake) +#pragma push_macro("BSONCXX_V1_CONFIG_VERSION_HPP") +#if !defined(BSONCXX_V1_CONFIG_VERSION_HPP) +#pragma push_macro("BSONCXX_VERSION_STRING") +#undef BSONCXX_VERSION_STRING +#pragma push_macro("BSONCXX_VERSION_MAJOR") +#undef BSONCXX_VERSION_MAJOR +#pragma push_macro("BSONCXX_VERSION_MINOR") +#undef BSONCXX_VERSION_MINOR +#pragma push_macro("BSONCXX_VERSION_PATCH") +#undef BSONCXX_VERSION_PATCH +#pragma push_macro("BSONCXX_VERSION_EXTRA") +#undef BSONCXX_VERSION_EXTRA +#endif + /// /// @file /// The bsoncxx v1 macro guard prelude header. diff --git a/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/config/postlude.hpp b/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/config/postlude.hpp index 2cf5c59460..adf5cbc5a9 100644 --- a/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/config/postlude.hpp +++ b/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/config/postlude.hpp @@ -12,16 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -// version.hpp (generated by CMake) -#undef BSONCXX_VERSION_EXTRA -#pragma pop_macro("BSONCXX_VERSION_EXTRA") -#undef BSONCXX_VERSION_MAJOR -#pragma pop_macro("BSONCXX_VERSION_MAJOR") -#undef BSONCXX_VERSION_MINOR -#pragma pop_macro("BSONCXX_VERSION_MINOR") -#undef BSONCXX_VERSION_PATCH -#pragma pop_macro("BSONCXX_VERSION_PATCH") - // prelude.hpp #undef BSONCXX_UNREACHABLE #pragma pop_macro("BSONCXX_UNREACHABLE") diff --git a/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/config/prelude.hpp b/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/config/prelude.hpp index 73ed708be5..7512b111ef 100644 --- a/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/config/prelude.hpp +++ b/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/config/prelude.hpp @@ -60,16 +60,6 @@ #pragma push_macro("BSONCXX_IF_GNU_LIKE") #undef BSONCXX_IF_GNU_LIKE -// version.hpp (generated by CMake) -#pragma push_macro("BSONCXX_VERSION_EXTRA") -#undef BSONCXX_VERSION_EXTRA -#pragma push_macro("BSONCXX_VERSION_MAJOR") -#undef BSONCXX_VERSION_MAJOR -#pragma push_macro("BSONCXX_VERSION_MINOR") -#undef BSONCXX_VERSION_MINOR -#pragma push_macro("BSONCXX_VERSION_PATCH") -#undef BSONCXX_VERSION_PATCH - #include // #include diff --git a/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/config/version.hpp b/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/config/version.hpp new file mode 100644 index 0000000000..f2322be6cc --- /dev/null +++ b/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/config/version.hpp @@ -0,0 +1,24 @@ +// 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. + +// For backward compatibility. +#include + +/// +/// @file +/// Provides macros describing the bsoncxx library version. +/// +/// @par Includes +/// - @ref bsoncxx/v1/config/version.hpp +/// diff --git a/src/bsoncxx/lib/CMakeLists.txt b/src/bsoncxx/lib/CMakeLists.txt index 9776e628ff..4103e8c825 100644 --- a/src/bsoncxx/lib/CMakeLists.txt +++ b/src/bsoncxx/lib/CMakeLists.txt @@ -19,6 +19,7 @@ set(bsoncxx_sources_v_noabi bsoncxx/v_noabi/bsoncxx/builder/core.cpp bsoncxx/v_noabi/bsoncxx/config/config.cpp bsoncxx/v_noabi/bsoncxx/config/export.cpp + bsoncxx/v_noabi/bsoncxx/config/version.cpp bsoncxx/v_noabi/bsoncxx/decimal128.cpp bsoncxx/v_noabi/bsoncxx/document/element.cpp bsoncxx/v_noabi/bsoncxx/document/value.cpp @@ -38,6 +39,7 @@ set(bsoncxx_sources_v_noabi set(bsoncxx_sources_v1 bsoncxx/v1/config/config.cpp bsoncxx/v1/config/export.cpp + bsoncxx/v1/config/version.cpp bsoncxx/v1/detail/postlude.cpp bsoncxx/v1/detail/prelude.cpp ) @@ -65,18 +67,13 @@ if(1) ) configure_file( - bsoncxx/v_noabi/bsoncxx/config/version.hpp.in - bsoncxx/v_noabi/bsoncxx/config/version.hpp - ) - - install(FILES - ${CMAKE_CURRENT_BINARY_DIR}/bsoncxx/v_noabi/bsoncxx/config/version.hpp - DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/bsoncxx/v_noabi/bsoncxx/config - COMPONENT dev + bsoncxx/v1/config/version.hpp.in + bsoncxx/v1/config/version.hpp ) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/bsoncxx/v1/config/config.hpp + ${CMAKE_CURRENT_BINARY_DIR}/bsoncxx/v1/config/version.hpp DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/bsoncxx/v1/config COMPONENT dev ) @@ -89,7 +86,6 @@ set_dist_list(src_bsoncxx_lib_DIST 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/config/version.hpp.in bsoncxx/v_noabi/bsoncxx/private/b64_ntop.hh bsoncxx/v_noabi/bsoncxx/private/helpers.hh bsoncxx/v_noabi/bsoncxx/private/make_unique.hh @@ -101,4 +97,5 @@ set_dist_list(src_bsoncxx_lib_DIST bsoncxx/v_noabi/bsoncxx/types/bson_value/private/value.hh bsoncxx/v_noabi/bsoncxx/types/private/convert.hh bsoncxx/v1/config/config.hpp.in + bsoncxx/v1/config/version.hpp.in ) diff --git a/src/bsoncxx/lib/bsoncxx/v1/config/version.cpp b/src/bsoncxx/lib/bsoncxx/v1/config/version.cpp new file mode 100644 index 0000000000..8168a00563 --- /dev/null +++ b/src/bsoncxx/lib/bsoncxx/v1/config/version.cpp @@ -0,0 +1,31 @@ +// 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 + +#if !defined(BSONCXX_VERSION_MAJOR) +#error "bsoncxx/v1/config/version.hpp should define BSONCXX_VERSION_MAJOR" +#endif + +#if !defined(BSONCXX_VERSION_MINOR) +#error "bsoncxx/v1/config/version.hpp should define BSONCXX_VERSION_MINOR" +#endif + +#if !defined(BSONCXX_VERSION_PATCH) +#error "bsoncxx/v1/config/version.hpp should define BSONCXX_VERSION_PATCH" +#endif + +#if !defined(BSONCXX_VERSION_EXTRA) +#error "bsoncxx/v1/config/version.hpp should define BSONCXX_VERSION_EXTRA" +#endif diff --git a/src/bsoncxx/lib/bsoncxx/v1/config/version.hpp.in b/src/bsoncxx/lib/bsoncxx/v1/config/version.hpp.in index 606ee8b6cf..0be0baff1c 100644 --- a/src/bsoncxx/lib/bsoncxx/v1/config/version.hpp.in +++ b/src/bsoncxx/lib/bsoncxx/v1/config/version.hpp.in @@ -12,6 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. +#if !defined(BSONCXX_V1_CONFIG_VERSION_HPP) +#define BSONCXX_V1_CONFIG_VERSION_HPP + // clang-format off #define BSONCXX_VERSION_MAJOR @BSONCXX_VERSION_MAJOR@ #define BSONCXX_VERSION_MINOR @BSONCXX_VERSION_MINOR@ @@ -23,8 +26,6 @@ /// @file /// Provides macros describing the bsoncxx library version. /// -/// @warning This header is not standalone includable! -/// /// /// @def BSONCXX_VERSION_MAJOR @@ -57,3 +58,5 @@ /// /// This value is derived from the `BUILD_VERSION` variable during configuration. /// + +#endif // BSONCXX_V1_CONFIG_VERSION_HPP diff --git a/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/config/version.cpp b/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/config/version.cpp new file mode 100644 index 0000000000..b67505f347 --- /dev/null +++ b/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/config/version.cpp @@ -0,0 +1,31 @@ +// 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 + +#if !defined(BSONCXX_VERSION_MAJOR) +#error "bsoncxx/v_noabi/bsoncxx/config/version.hpp should define BSONCXX_VERSION_MAJOR" +#endif + +#if !defined(BSONCXX_VERSION_MINOR) +#error "bsoncxx/v_noabi/bsoncxx/config/version.hpp should define BSONCXX_VERSION_MINOR" +#endif + +#if !defined(BSONCXX_VERSION_PATCH) +#error "bsoncxx/v_noabi/bsoncxx/config/version.hpp should define BSONCXX_VERSION_PATCH" +#endif + +#if !defined(BSONCXX_VERSION_EXTRA) +#error "bsoncxx/v_noabi/bsoncxx/config/version.hpp should define BSONCXX_VERSION_EXTRA" +#endif diff --git a/src/bsoncxx/test/CMakeLists.txt b/src/bsoncxx/test/CMakeLists.txt index c22dbc9989..b6aa7a78db 100644 --- a/src/bsoncxx/test/CMakeLists.txt +++ b/src/bsoncxx/test/CMakeLists.txt @@ -96,15 +96,16 @@ if(ENABLE_MACRO_GUARD_TESTS) BSONCXX_ABI_NO_EXPORT BSONCXX_DEPRECATED - # bsoncxx/v1/detail/prelude.hpp - BSONCXX_PRIVATE_V1_INSIDE_MACRO_GUARD_SCOPE - - # version.hpp (generated by CMake) + # bsoncxx/v1/config/version.hpp (generated by CMake) + BSONCXX_VERSION_STRING BSONCXX_VERSION_EXTRA BSONCXX_VERSION_MAJOR BSONCXX_VERSION_MINOR BSONCXX_VERSION_PATCH + # bsoncxx/v1/detail/prelude.hpp + BSONCXX_PRIVATE_V1_INSIDE_MACRO_GUARD_SCOPE + # prelude.hpp BSONCXX_UNREACHABLE diff --git a/src/mongocxx/include/mongocxx/v1/detail/postlude.hpp b/src/mongocxx/include/mongocxx/v1/detail/postlude.hpp index 8c82db872b..a19d8ebdd6 100644 --- a/src/mongocxx/include/mongocxx/v1/detail/postlude.hpp +++ b/src/mongocxx/include/mongocxx/v1/detail/postlude.hpp @@ -22,6 +22,16 @@ #pragma pop_macro("MONGOCXX_DEPRECATED") #endif +// mongocxx/v1/config/version.hpp (generated by CMake) +#pragma pop_macro("MONGOCXX_V1_CONFIG_VERSION_HPP") +#if !defined(MONGOCXX_V1_CONFIG_VERSION_HPP) +#pragma pop_macro("MONGOCXX_VERSION_STRING") +#pragma pop_macro("MONGOCXX_VERSION_EXTRA") +#pragma pop_macro("MONGOCXX_VERSION_MAJOR") +#pragma pop_macro("MONGOCXX_VERSION_MINOR") +#pragma pop_macro("MONGOCXX_VERSION_PATCH") +#endif + #if !defined(MONGOCXX_PRIVATE_V1_INSIDE_MACRO_GUARD_SCOPE) #error "postlude header included without a matching prelude header" #endif diff --git a/src/mongocxx/include/mongocxx/v1/detail/prelude.hpp b/src/mongocxx/include/mongocxx/v1/detail/prelude.hpp index 7e8fa83265..e8ef787608 100644 --- a/src/mongocxx/include/mongocxx/v1/detail/prelude.hpp +++ b/src/mongocxx/include/mongocxx/v1/detail/prelude.hpp @@ -31,6 +31,21 @@ #undef MONGOCXX_DEPRECATED #endif +// mongocxx/v1/config/version.hpp (generated by CMake) +#pragma push_macro("MONGOCXX_V1_CONFIG_VERSION_HPP") +#if !defined(MONGOCXX_V1_CONFIG_VERSION_HPP) +#pragma push_macro("MONGOCXX_VERSION_STRING") +#undef MONGOCXX_VERSION_STRING +#pragma push_macro("MONGOCXX_VERSION_EXTRA") +#undef MONGOCXX_VERSION_EXTRA +#pragma push_macro("MONGOCXX_VERSION_MAJOR") +#undef MONGOCXX_VERSION_MAJOR +#pragma push_macro("MONGOCXX_VERSION_MINOR") +#undef MONGOCXX_VERSION_MINOR +#pragma push_macro("MONGOCXX_VERSION_PATCH") +#undef MONGOCXX_VERSION_PATCH +#endif + /// /// @file /// The mongocxx v1 macro guard prelude header. diff --git a/src/mongocxx/include/mongocxx/v_noabi/mongocxx/config/postlude.hpp b/src/mongocxx/include/mongocxx/v_noabi/mongocxx/config/postlude.hpp index bdc89bb476..c018128179 100644 --- a/src/mongocxx/include/mongocxx/v_noabi/mongocxx/config/postlude.hpp +++ b/src/mongocxx/include/mongocxx/v_noabi/mongocxx/config/postlude.hpp @@ -12,18 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -// version.hpp (generated by CMake) -#undef MONGOCXX_VERSION_STRING -#pragma pop_macro("MONGOCXX_VERSION_STRING") -#undef MONGOCXX_VERSION_EXTRA -#pragma pop_macro("MONGOCXX_VERSION_EXTRA") -#undef MONGOCXX_VERSION_MAJOR -#pragma pop_macro("MONGOCXX_VERSION_MAJOR") -#undef MONGOCXX_VERSION_MINOR -#pragma pop_macro("MONGOCXX_VERSION_MINOR") -#undef MONGOCXX_VERSION_PATCH -#pragma pop_macro("MONGOCXX_VERSION_PATCH") - // prelude.hpp #undef MONGOCXX_UNREACHABLE #pragma pop_macro("MONGOCXX_UNREACHABLE") diff --git a/src/mongocxx/include/mongocxx/v_noabi/mongocxx/config/prelude.hpp b/src/mongocxx/include/mongocxx/v_noabi/mongocxx/config/prelude.hpp index 529ceeee16..2cabe8476f 100644 --- a/src/mongocxx/include/mongocxx/v_noabi/mongocxx/config/prelude.hpp +++ b/src/mongocxx/include/mongocxx/v_noabi/mongocxx/config/prelude.hpp @@ -14,18 +14,6 @@ #include -// version.hpp (generated by CMake) -#pragma push_macro("MONGOCXX_VERSION_STRING") -#undef MONGOCXX_VERSION_STRING -#pragma push_macro("MONGOCXX_VERSION_EXTRA") -#undef MONGOCXX_VERSION_EXTRA -#pragma push_macro("MONGOCXX_VERSION_MAJOR") -#undef MONGOCXX_VERSION_MAJOR -#pragma push_macro("MONGOCXX_VERSION_MINOR") -#undef MONGOCXX_VERSION_MINOR -#pragma push_macro("MONGOCXX_VERSION_PATCH") -#undef MONGOCXX_VERSION_PATCH - #include #include #include diff --git a/src/mongocxx/include/mongocxx/v_noabi/mongocxx/config/version.hpp b/src/mongocxx/include/mongocxx/v_noabi/mongocxx/config/version.hpp new file mode 100644 index 0000000000..32fcc675de --- /dev/null +++ b/src/mongocxx/include/mongocxx/v_noabi/mongocxx/config/version.hpp @@ -0,0 +1,24 @@ +// 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. + +// For backward compatibility. +#include + +/// +/// @file +/// Provides macros describing the mongocxx library version. +/// +/// @par Includes +/// - @ref mongocxx/v1/config/version.hpp +/// diff --git a/src/mongocxx/lib/CMakeLists.txt b/src/mongocxx/lib/CMakeLists.txt index 6f42d38337..0a4fb40d9e 100644 --- a/src/mongocxx/lib/CMakeLists.txt +++ b/src/mongocxx/lib/CMakeLists.txt @@ -21,6 +21,7 @@ set(mongocxx_sources_v_noabi mongocxx/v_noabi/mongocxx/collection.cpp mongocxx/v_noabi/mongocxx/config/config.cpp mongocxx/v_noabi/mongocxx/config/export.cpp + mongocxx/v_noabi/mongocxx/config/version.cpp mongocxx/v_noabi/mongocxx/cursor.cpp mongocxx/v_noabi/mongocxx/database.cpp mongocxx/v_noabi/mongocxx/events/command_failed_event.cpp @@ -119,6 +120,7 @@ set(mongocxx_sources_v_noabi set(mongocxx_sources_v1 mongocxx/v1/config/config.cpp mongocxx/v1/config/export.cpp + mongocxx/v1/config/version.cpp mongocxx/v1/detail/postlude.cpp mongocxx/v1/detail/prelude.cpp ) @@ -152,24 +154,19 @@ endif() # Generate and install public headers. if(1) - configure_file( - mongocxx/v_noabi/mongocxx/config/version.hpp.in - mongocxx/v_noabi/mongocxx/config/version.hpp - ) - configure_file( mongocxx/v1/config/config.hpp.in mongocxx/v1/config/config.hpp ) - install(FILES - ${CMAKE_CURRENT_BINARY_DIR}/mongocxx/v_noabi/mongocxx/config/version.hpp - DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/mongocxx/v_noabi/mongocxx/config - COMPONENT dev + configure_file( + mongocxx/v1/config/version.hpp.in + mongocxx/v1/config/version.hpp ) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/mongocxx/v1/config/config.hpp + ${CMAKE_CURRENT_BINARY_DIR}/mongocxx/v1/config/version.hpp DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/mongocxx/v1/config COMPONENT dev ) @@ -182,7 +179,6 @@ set_dist_list(src_mongocxx_lib_DIST 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/config/version.hpp.in 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 @@ -218,4 +214,5 @@ set_dist_list(src_mongocxx_lib_DIST mongocxx/v_noabi/mongocxx/test_util/export_for_testing.hh mongocxx/v_noabi/mongocxx/test_util/mock.hh mongocxx/v1/config/config.hpp.in + mongocxx/v1/config/version.hpp.in ) diff --git a/src/mongocxx/lib/mongocxx/v1/config/version.cpp b/src/mongocxx/lib/mongocxx/v1/config/version.cpp new file mode 100644 index 0000000000..83d06cd427 --- /dev/null +++ b/src/mongocxx/lib/mongocxx/v1/config/version.cpp @@ -0,0 +1,31 @@ +// 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 + +#if !defined(MONGOCXX_VERSION_MAJOR) +#error "mongocxx/v1/config/version.hpp should define MONGOCXX_VERSION_MAJOR" +#endif + +#if !defined(MONGOCXX_VERSION_MINOR) +#error "mongocxx/v1/config/version.hpp should define MONGOCXX_VERSION_MINOR" +#endif + +#if !defined(MONGOCXX_VERSION_PATCH) +#error "mongocxx/v1/config/version.hpp should define MONGOCXX_VERSION_PATCH" +#endif + +#if !defined(MONGOCXX_VERSION_EXTRA) +#error "mongocxx/v1/config/version.hpp should define MONGOCXX_VERSION_EXTRA" +#endif diff --git a/src/mongocxx/lib/mongocxx/v1/config/version.hpp.in b/src/mongocxx/lib/mongocxx/v1/config/version.hpp.in index ff95adebb0..6f9507d356 100644 --- a/src/mongocxx/lib/mongocxx/v1/config/version.hpp.in +++ b/src/mongocxx/lib/mongocxx/v1/config/version.hpp.in @@ -12,6 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. +#if !defined(MONGOCXX_V1_CONFIG_VERSION_HPP) +#define MONGOCXX_V1_CONFIG_VERSION_HPP + // clang-format off #define MONGOCXX_VERSION_STRING "@MONGOCXX_VERSION@" #define MONGOCXX_VERSION_MAJOR @MONGOCXX_VERSION_MAJOR@ @@ -66,3 +69,5 @@ /// /// This value is derived from the `BUILD_VERSION` variable during configuration. /// + +#endif // MONGOCXX_V1_CONFIG_VERSION_HPP diff --git a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/config/version.cpp b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/config/version.cpp new file mode 100644 index 0000000000..ba65b2e3d2 --- /dev/null +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/config/version.cpp @@ -0,0 +1,31 @@ +// 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 + +#if !defined(MONGOCXX_VERSION_MAJOR) +#error "mongocxx/v_noabi/mongocxx/config/version.hpp should define MONGOCXX_VERSION_MAJOR" +#endif + +#if !defined(MONGOCXX_VERSION_MINOR) +#error "mongocxx/v_noabi/mongocxx/config/version.hpp should define MONGOCXX_VERSION_MINOR" +#endif + +#if !defined(MONGOCXX_VERSION_PATCH) +#error "mongocxx/v_noabi/mongocxx/config/version.hpp should define MONGOCXX_VERSION_PATCH" +#endif + +#if !defined(MONGOCXX_VERSION_EXTRA) +#error "mongocxx/v_noabi/mongocxx/config/version.hpp should define MONGOCXX_VERSION_EXTRA" +#endif diff --git a/src/mongocxx/test/CMakeLists.txt b/src/mongocxx/test/CMakeLists.txt index 07750502b9..8f6b514116 100644 --- a/src/mongocxx/test/CMakeLists.txt +++ b/src/mongocxx/test/CMakeLists.txt @@ -299,16 +299,16 @@ if(ENABLE_MACRO_GUARD_TESTS) MONGOCXX_ABI_NO_EXPORT MONGOCXX_DEPRECATED - # mongocxx/v1/detail/prelude.hpp - MONGOCXX_PRIVATE_V1_INSIDE_MACRO_GUARD_SCOPE - - # version.hpp (generated by CMake) + # mongocxx/v1/config/version.hpp (generated by CMake) MONGOCXX_VERSION_STRING MONGOCXX_VERSION_EXTRA MONGOCXX_VERSION_MAJOR MONGOCXX_VERSION_MINOR MONGOCXX_VERSION_PATCH + # mongocxx/v1/detail/prelude.hpp + MONGOCXX_PRIVATE_V1_INSIDE_MACRO_GUARD_SCOPE + # prelude.hpp MONGOCXX_UNREACHABLE From 1a1a7015a192630bab23ae18b8a3df3bdd3efa59 Mon Sep 17 00:00:00 2001 From: Ezra Chung Date: Fri, 10 Jan 2025 15:12:09 -0600 Subject: [PATCH 10/19] v1: add BSONCXX_VERSION_STRING --- src/bsoncxx/lib/bsoncxx/v1/config/version.hpp.in | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/bsoncxx/lib/bsoncxx/v1/config/version.hpp.in b/src/bsoncxx/lib/bsoncxx/v1/config/version.hpp.in index 0be0baff1c..8ad425fb79 100644 --- a/src/bsoncxx/lib/bsoncxx/v1/config/version.hpp.in +++ b/src/bsoncxx/lib/bsoncxx/v1/config/version.hpp.in @@ -16,6 +16,7 @@ #define BSONCXX_V1_CONFIG_VERSION_HPP // clang-format off +#define BSONCXX_VERSION_STRING "@BSONCXX_VERSION@" #define BSONCXX_VERSION_MAJOR @BSONCXX_VERSION_MAJOR@ #define BSONCXX_VERSION_MINOR @BSONCXX_VERSION_MINOR@ #define BSONCXX_VERSION_PATCH @BSONCXX_VERSION_PATCH@ @@ -27,6 +28,14 @@ /// Provides macros describing the bsoncxx library version. /// +/// +/// @def BSONCXX_VERSION_STRING +/// @hideinitializer +/// This library's full version number as a string literal (e.g. `"1.2.3-extra"`). +/// +/// This value is derived from the `BUILD_VERSION` variable during configuration. +/// + /// /// @def BSONCXX_VERSION_MAJOR /// @hideinitializer From 6f7a978b252d56879f559ef2cea685fbe230a6d6 Mon Sep 17 00:00:00 2001 From: Ezra Chung Date: Fri, 10 Jan 2025 15:12:10 -0600 Subject: [PATCH 11/19] v1 <- v_noabi: stdx --- .../{v_noabi/bsoncxx/stdx/operators.hpp => v1/detail/compare.hpp} | 0 .../{v_noabi/bsoncxx/config/util.hpp => v1/detail/macros.hpp} | 0 .../bsoncxx/{v_noabi/bsoncxx/stdx => v1/detail}/type_traits.hpp | 0 .../include/bsoncxx/{v_noabi/bsoncxx => v1}/stdx/optional.hpp | 0 .../include/bsoncxx/{v_noabi/bsoncxx => v1}/stdx/string_view.hpp | 0 5 files changed, 0 insertions(+), 0 deletions(-) rename src/bsoncxx/include/bsoncxx/{v_noabi/bsoncxx/stdx/operators.hpp => v1/detail/compare.hpp} (100%) rename src/bsoncxx/include/bsoncxx/{v_noabi/bsoncxx/config/util.hpp => v1/detail/macros.hpp} (100%) rename src/bsoncxx/include/bsoncxx/{v_noabi/bsoncxx/stdx => v1/detail}/type_traits.hpp (100%) rename src/bsoncxx/include/bsoncxx/{v_noabi/bsoncxx => v1}/stdx/optional.hpp (100%) rename src/bsoncxx/include/bsoncxx/{v_noabi/bsoncxx => v1}/stdx/string_view.hpp (100%) diff --git a/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/stdx/operators.hpp b/src/bsoncxx/include/bsoncxx/v1/detail/compare.hpp similarity index 100% rename from src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/stdx/operators.hpp rename to src/bsoncxx/include/bsoncxx/v1/detail/compare.hpp diff --git a/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/config/util.hpp b/src/bsoncxx/include/bsoncxx/v1/detail/macros.hpp similarity index 100% rename from src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/config/util.hpp rename to src/bsoncxx/include/bsoncxx/v1/detail/macros.hpp diff --git a/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/stdx/type_traits.hpp b/src/bsoncxx/include/bsoncxx/v1/detail/type_traits.hpp similarity index 100% rename from src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/stdx/type_traits.hpp rename to src/bsoncxx/include/bsoncxx/v1/detail/type_traits.hpp diff --git a/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/stdx/optional.hpp b/src/bsoncxx/include/bsoncxx/v1/stdx/optional.hpp similarity index 100% rename from src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/stdx/optional.hpp rename to src/bsoncxx/include/bsoncxx/v1/stdx/optional.hpp diff --git a/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/stdx/string_view.hpp b/src/bsoncxx/include/bsoncxx/v1/stdx/string_view.hpp similarity index 100% rename from src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/stdx/string_view.hpp rename to src/bsoncxx/include/bsoncxx/v1/stdx/string_view.hpp From ba4797f973278f1ca0057a34d2d4324c6297b9d0 Mon Sep 17 00:00:00 2001 From: Ezra Chung Date: Fri, 10 Jan 2025 15:12:10 -0600 Subject: [PATCH 12/19] v1: stdx + macros.hpp --- src/bsoncxx/include/bsoncxx/docs/v1.hpp | 10 +++ .../include/bsoncxx/v1/detail/compare.hpp | 13 ++-- .../include/bsoncxx/v1/detail/macros.hpp | 50 ++++++++++++- .../include/bsoncxx/v1/detail/postlude.hpp | 27 +++++++ .../include/bsoncxx/v1/detail/prelude.hpp | 49 +++++++++++++ .../include/bsoncxx/v1/detail/type_traits.hpp | 21 +++--- .../include/bsoncxx/v1/stdx/optional.hpp | 71 ++++++++----------- .../include/bsoncxx/v1/stdx/string_view.hpp | 47 ++++++------ .../v_noabi/bsoncxx/config/compiler.hpp | 27 +------ .../v_noabi/bsoncxx/config/postlude.hpp | 33 --------- .../v_noabi/bsoncxx/config/prelude.hpp | 53 +------------- .../bsoncxx/v_noabi/bsoncxx/config/util.hpp | 23 ++++++ .../v_noabi/bsoncxx/stdx/operators.hpp | 25 +++++++ .../bsoncxx/v_noabi/bsoncxx/stdx/optional.hpp | 56 +++++++++++++++ .../v_noabi/bsoncxx/stdx/string_view.hpp | 48 +++++++++++++ .../v_noabi/bsoncxx/stdx/type_traits.hpp | 25 +++++++ src/bsoncxx/test/CMakeLists.txt | 44 ++++++------ .../include/mongocxx/v1/detail/macros.hpp | 28 ++++++++ .../include/mongocxx/v1/detail/postlude.hpp | 6 ++ .../include/mongocxx/v1/detail/prelude.hpp | 7 ++ .../v_noabi/mongocxx/config/postlude.hpp | 4 -- .../v_noabi/mongocxx/config/prelude.hpp | 5 -- .../v_noabi/mongocxx/gridfs/bucket.cpp | 2 + .../mongocxx/v_noabi/mongocxx/instance.cpp | 2 + .../mongocxx/private/client_session.hh | 2 + .../v_noabi/mongocxx/private/conversions.cpp | 2 + .../v_noabi/mongocxx/validation_criteria.cpp | 2 + .../v_noabi/mongocxx/write_concern.cpp | 2 + src/mongocxx/test/CMakeLists.txt | 7 +- src/mongocxx/test/client_side_encryption.cpp | 2 + 30 files changed, 465 insertions(+), 228 deletions(-) create mode 100644 src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/config/util.hpp create mode 100644 src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/stdx/operators.hpp create mode 100644 src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/stdx/optional.hpp create mode 100644 src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/stdx/string_view.hpp create mode 100644 src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/stdx/type_traits.hpp create mode 100644 src/mongocxx/include/mongocxx/v1/detail/macros.hpp diff --git a/src/bsoncxx/include/bsoncxx/docs/v1.hpp b/src/bsoncxx/include/bsoncxx/docs/v1.hpp index c4ebf982c1..566cd66653 100644 --- a/src/bsoncxx/include/bsoncxx/docs/v1.hpp +++ b/src/bsoncxx/include/bsoncxx/docs/v1.hpp @@ -40,7 +40,17 @@ /// @warning For internal use only! /// +/// +/// @dir bsoncxx/v1/stdx +/// Provides headers declaring entities in @ref bsoncxx::v1::stdx. +/// + /// /// @namespace bsoncxx::v1 /// Declares entities whose ABI stability is guaranteed for documented symbols. /// + +/// +/// @namespace bsoncxx::v1::stdx +/// @copydoc bsoncxx::stdx +/// diff --git a/src/bsoncxx/include/bsoncxx/v1/detail/compare.hpp b/src/bsoncxx/include/bsoncxx/v1/detail/compare.hpp index f3cf7868eb..aa79ad1cc9 100644 --- a/src/bsoncxx/include/bsoncxx/v1/detail/compare.hpp +++ b/src/bsoncxx/include/bsoncxx/v1/detail/compare.hpp @@ -14,14 +14,15 @@ #pragma once +#include + +#include +#include + #include #include #include -#include - -#include - namespace bsoncxx { namespace detail { @@ -208,11 +209,11 @@ struct is_totally_ordered_with : conjunction< } // namespace detail } // namespace bsoncxx -#include +#include /// /// @file -/// Provides comparison-related utilities for internal use. +/// For internal use only! /// /// @warning For internal use only! /// diff --git a/src/bsoncxx/include/bsoncxx/v1/detail/macros.hpp b/src/bsoncxx/include/bsoncxx/v1/detail/macros.hpp index 37e8e7a9f0..bdb9bb3cd1 100644 --- a/src/bsoncxx/include/bsoncxx/v1/detail/macros.hpp +++ b/src/bsoncxx/include/bsoncxx/v1/detail/macros.hpp @@ -1,3 +1,21 @@ +// 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. + +// Traditional include guard is required to support v_noabi include-via-prelude. +#if !defined(BSONCXX_V1_DETAIL_MACROS_HPP) +#define BSONCXX_V1_DETAIL_MACROS_HPP + // Convert the given macro argument to a string literal, after macro expansion. #define BSONCXX_STRINGIFY(...) BSONCXX_STRINGIFY_IMPL(__VA_ARGS__) #define BSONCXX_STRINGIFY_IMPL(...) #__VA_ARGS__ @@ -65,6 +83,28 @@ #define bsoncxx_cxx14_constexpr inline #endif +#define BSONCXX_IF_MSVC(...) +#define BSONCXX_IF_GCC(...) +#define BSONCXX_IF_CLANG(...) +#define BSONCXX_IF_GNU_LIKE(...) \ + BSONCXX_IF_GCC(__VA_ARGS__) \ + BSONCXX_IF_CLANG(__VA_ARGS__) + +// clang-format off +#ifdef __GNUC__ + #ifdef __clang__ + #undef BSONCXX_IF_CLANG + #define BSONCXX_IF_CLANG(...) __VA_ARGS__ + #else + #undef BSONCXX_IF_GCC + #define BSONCXX_IF_GCC(...) __VA_ARGS__ + #endif +#elif defined(_MSC_VER) + #undef BSONCXX_IF_MSVC + #define BSONCXX_IF_MSVC(...) __VA_ARGS__ +#endif +// clang-format on + // Disable a warning for a particular compiler. // // The argument should be of the form: @@ -103,9 +143,17 @@ #define BSONCXX_FWD(...) static_cast(__VA_ARGS__) +#define BSONCXX_UNREACHABLE \ + if (1) { \ + std::abort(); \ + } else \ + ((void)0) + +#endif // BSONCXX_V1_DETAIL_MACROS_HPP + /// /// @file -/// Provides macros for internal use. +/// For internal use only! /// /// @warning For internal use only! /// diff --git a/src/bsoncxx/include/bsoncxx/v1/detail/postlude.hpp b/src/bsoncxx/include/bsoncxx/v1/detail/postlude.hpp index 0860630288..faf90e2bf1 100644 --- a/src/bsoncxx/include/bsoncxx/v1/detail/postlude.hpp +++ b/src/bsoncxx/include/bsoncxx/v1/detail/postlude.hpp @@ -39,6 +39,33 @@ #pragma pop_macro("BSONCXX_VERSION_EXTRA") #endif +// bsoncxx/v1/detail/macros.hpp +#pragma pop_macro("BSONCXX_V1_DETAIL_MACROS_HPP") +#if !defined(BSONCXX_V1_DETAIL_MACROS_HPP) +#pragma pop_macro("BSONCXX_CONCAT") +#pragma pop_macro("BSONCXX_CONCAT_IMPL") +#pragma pop_macro("BSONCXX_DISABLE_WARNING") +#pragma pop_macro("BSONCXX_FORCE_SEMICOLON") +#pragma pop_macro("BSONCXX_FWD") +#pragma pop_macro("BSONCXX_IF_CLANG") +#pragma pop_macro("BSONCXX_IF_GCC") +#pragma pop_macro("BSONCXX_IF_GNU_LIKE") +#pragma pop_macro("BSONCXX_IF_MSVC") +#pragma pop_macro("BSONCXX_POP_WARNINGS") +#pragma pop_macro("BSONCXX_PRAGMA") +#pragma pop_macro("BSONCXX_PUSH_WARNINGS") +#pragma pop_macro("BSONCXX_RETURNS") +#pragma pop_macro("BSONCXX_STRINGIFY") +#pragma pop_macro("BSONCXX_STRINGIFY_IMPL") +#pragma pop_macro("BSONCXX_UNREACHABLE") +#pragma pop_macro("_bsoncxxDisableWarningImpl_for_Clang") +#pragma pop_macro("_bsoncxxDisableWarningImpl_for_GCC") +#pragma pop_macro("_bsoncxxDisableWarningImpl_for_GNU") +#pragma pop_macro("_bsoncxxDisableWarningImpl_for_MSVC") +#pragma pop_macro("_bsoncxxPragma") +#pragma pop_macro("bsoncxx_cxx14_constexpr") +#endif + #if !defined(BSONCXX_PRIVATE_V1_INSIDE_MACRO_GUARD_SCOPE) #error "postlude header included without a matching prelude header" #endif diff --git a/src/bsoncxx/include/bsoncxx/v1/detail/prelude.hpp b/src/bsoncxx/include/bsoncxx/v1/detail/prelude.hpp index 1a1863d309..f5a2388d4d 100644 --- a/src/bsoncxx/include/bsoncxx/v1/detail/prelude.hpp +++ b/src/bsoncxx/include/bsoncxx/v1/detail/prelude.hpp @@ -55,6 +55,55 @@ #undef BSONCXX_VERSION_EXTRA #endif +// bsoncxx/v1/detail/macros.hpp +#pragma push_macro("BSONCXX_V1_DETAIL_MACROS_HPP") +#if !defined(BSONCXX_V1_DETAIL_MACROS_HPP) +#pragma push_macro("BSONCXX_CONCAT") +#undef BSONCXX_CONCAT +#pragma push_macro("BSONCXX_CONCAT_IMPL") +#undef BSONCXX_CONCAT_IMPL +#pragma push_macro("BSONCXX_DISABLE_WARNING") +#undef BSONCXX_DISABLE_WARNING +#pragma push_macro("BSONCXX_FORCE_SEMICOLON") +#undef BSONCXX_FORCE_SEMICOLON +#pragma push_macro("BSONCXX_FWD") +#undef BSONCXX_FWD +#pragma push_macro("BSONCXX_IF_CLANG") +#undef BSONCXX_IF_CLANG +#pragma push_macro("BSONCXX_IF_GCC") +#undef BSONCXX_IF_GCC +#pragma push_macro("BSONCXX_IF_GNU_LIKE") +#undef BSONCXX_IF_GNU_LIKE +#pragma push_macro("BSONCXX_IF_MSVC") +#undef BSONCXX_IF_MSVC +#pragma push_macro("BSONCXX_POP_WARNINGS") +#undef BSONCXX_POP_WARNINGS +#pragma push_macro("BSONCXX_PRAGMA") +#undef BSONCXX_PRAGMA +#pragma push_macro("BSONCXX_PUSH_WARNINGS") +#undef BSONCXX_PUSH_WARNINGS +#pragma push_macro("BSONCXX_RETURNS") +#undef BSONCXX_RETURNS +#pragma push_macro("BSONCXX_STRINGIFY") +#undef BSONCXX_STRINGIFY +#pragma push_macro("BSONCXX_STRINGIFY_IMPL") +#undef BSONCXX_STRINGIFY_IMPL +#pragma push_macro("BSONCXX_UNREACHABLE") +#undef BSONCXX_UNREACHABLE +#pragma push_macro("_bsoncxxDisableWarningImpl_for_Clang") +#undef _bsoncxxDisableWarningImpl_for_Clang +#pragma push_macro("_bsoncxxDisableWarningImpl_for_GCC") +#undef _bsoncxxDisableWarningImpl_for_GCC +#pragma push_macro("_bsoncxxDisableWarningImpl_for_GNU") +#undef _bsoncxxDisableWarningImpl_for_GNU +#pragma push_macro("_bsoncxxDisableWarningImpl_for_MSVC") +#undef _bsoncxxDisableWarningImpl_for_MSVC +#pragma push_macro("_bsoncxxPragma") +#undef _bsoncxxPragma +#pragma push_macro("bsoncxx_cxx14_constexpr") +#undef bsoncxx_cxx14_constexpr +#endif + /// /// @file /// The bsoncxx v1 macro guard prelude header. diff --git a/src/bsoncxx/include/bsoncxx/v1/detail/type_traits.hpp b/src/bsoncxx/include/bsoncxx/v1/detail/type_traits.hpp index 670302fedf..cca3727697 100644 --- a/src/bsoncxx/include/bsoncxx/v1/detail/type_traits.hpp +++ b/src/bsoncxx/include/bsoncxx/v1/detail/type_traits.hpp @@ -14,11 +14,13 @@ #pragma once +#include + +#include + #include #include -#include - namespace bsoncxx { namespace detail { @@ -433,12 +435,11 @@ template auto is_swappable_f(rank<0>) -> std::false_type; template -auto is_swappable_f(rank<1>) // - noexcept( - noexcept(swap(std::declval(), std::declval())) && noexcept(swap(std::declval(), std::declval()))) - -> true_t< - decltype(swap(std::declval(), std::declval())), - decltype(swap(std::declval(), std::declval()))>; +auto is_swappable_f(rank<1>) noexcept( + noexcept(swap(std::declval(), std::declval())) && noexcept(swap(std::declval(), std::declval()))) + -> true_t< + decltype(swap(std::declval(), std::declval())), + decltype(swap(std::declval(), std::declval()))>; template auto is_nothrow_swappable_f(rank<0>) -> std::false_type; @@ -464,11 +465,11 @@ struct is_nothrow_swappable : is_nothrow_swappable_with {}; } // namespace detail } // namespace bsoncxx -#include +#include /// /// @file -/// Provides ``-related polyfills for internal use. +/// For internal use only! /// /// @warning For internal use only! /// diff --git a/src/bsoncxx/include/bsoncxx/v1/stdx/optional.hpp b/src/bsoncxx/include/bsoncxx/v1/stdx/optional.hpp index 5e77c64ea5..631aa84108 100644 --- a/src/bsoncxx/include/bsoncxx/v1/stdx/optional.hpp +++ b/src/bsoncxx/include/bsoncxx/v1/stdx/optional.hpp @@ -14,29 +14,35 @@ #pragma once -#include +#include + +#include #if defined(BSONCXX_POLY_USE_STD) #include namespace bsoncxx { -namespace v_noabi { +namespace v1 { namespace stdx { -using ::std::in_place; -using ::std::in_place_t; -using ::std::make_optional; -using ::std::nullopt; -using ::std::nullopt_t; -using ::std::optional; +using std::in_place; +using std::in_place_t; +using std::make_optional; +using std::nullopt; +using std::nullopt_t; +using std::optional; } // namespace stdx -} // namespace v_noabi +} // namespace v1 } // namespace bsoncxx #elif defined(BSONCXX_POLY_USE_IMPLS) +#include +#include +#include + #include #include #include @@ -47,12 +53,9 @@ using ::std::optional; #include #include -#include -#include - namespace bsoncxx { -namespace v_noabi { +namespace v1 { namespace stdx { @@ -128,14 +131,13 @@ struct enable_opt_conversion : bsoncxx::detail::conjunction< std::is_convertible const&&, T>>>>> {}; template -struct enable_opt_value_conversion // - : bsoncxx::detail::conjunction< - std::is_constructible, - bsoncxx::detail::negation>, - bsoncxx::detail::negation>>, - bsoncxx::detail::disjunction< - bsoncxx::detail::negation>, - detail::not_an_optional>>> {}; +struct enable_opt_value_conversion : bsoncxx::detail::conjunction< + std::is_constructible, + bsoncxx::detail::negation>, + bsoncxx::detail::negation>>, + bsoncxx::detail::disjunction< + bsoncxx::detail::negation>, + detail::not_an_optional>>> {}; } // namespace detail @@ -751,14 +753,14 @@ struct optional_hash { } // namespace stdx -} // namespace v_noabi +} // namespace v1 } // namespace bsoncxx namespace std { template -struct hash> : bsoncxx::v_noabi::stdx::detail::optional_hash {}; +struct hash> : bsoncxx::v1::stdx::detail::optional_hash {}; } // namespace std @@ -766,20 +768,7 @@ struct hash> : bsoncxx::v_noabi::stdx::detai #error "Cannot find a valid polyfill for optional" #endif -#include - -namespace bsoncxx { -namespace stdx { - -using ::bsoncxx::v_noabi::stdx::in_place; -using ::bsoncxx::v_noabi::stdx::in_place_t; -using ::bsoncxx::v_noabi::stdx::make_optional; -using ::bsoncxx::v_noabi::stdx::nullopt; -using ::bsoncxx::v_noabi::stdx::nullopt_t; -using ::bsoncxx::v_noabi::stdx::optional; - -} // namespace stdx -} // namespace bsoncxx +#include /// /// @file @@ -787,7 +776,7 @@ using ::bsoncxx::v_noabi::stdx::optional; /// /// @note The API and ABI compatibility of this polyfill is determined by polyfill build /// configuration variables and the `BSONCXX_POLY_USE_*` macros provided by @ref -/// bsoncxx/v_noabi/bsoncxx/config/config.hpp. +/// bsoncxx/v1/config/config.hpp. /// /// @see /// - [Choosing a C++17 Polyfill](https://www.mongodb.com/docs/languages/cpp/cpp-driver/current/polyfill-selection/) @@ -796,7 +785,7 @@ using ::bsoncxx::v_noabi::stdx::optional; #if defined(BSONCXX_PRIVATE_DOXYGEN_PREPROCESSOR) namespace bsoncxx { -namespace v_noabi { +namespace v1 { namespace stdx { /// @@ -804,13 +793,13 @@ namespace stdx { /// /// @note The API and ABI compatibility of this polyfill is determined by polyfill build /// configuration variables and the `BSONCXX_POLY_USE_*` macros provided by @ref -/// bsoncxx/v_noabi/bsoncxx/config/config.hpp. +/// bsoncxx/v1/config/config.hpp. /// template class optional {}; } // namespace stdx -} // namespace v_noabi +} // namespace v1 } // namespace bsoncxx #endif // defined(BSONCXX_PRIVATE_DOXYGEN_PREPROCESSOR) diff --git a/src/bsoncxx/include/bsoncxx/v1/stdx/string_view.hpp b/src/bsoncxx/include/bsoncxx/v1/stdx/string_view.hpp index 2a458c4064..e721cb4916 100644 --- a/src/bsoncxx/include/bsoncxx/v1/stdx/string_view.hpp +++ b/src/bsoncxx/include/bsoncxx/v1/stdx/string_view.hpp @@ -14,25 +14,31 @@ #pragma once -#include +#include + +#include #if defined(BSONCXX_POLY_USE_STD) #include namespace bsoncxx { -namespace v_noabi { +namespace v1 { namespace stdx { -using ::std::basic_string_view; -using ::std::string_view; +using std::basic_string_view; +using std::string_view; } // namespace stdx -} // namespace v_noabi +} // namespace v1 } // namespace bsoncxx #elif defined(BSONCXX_POLY_USE_IMPLS) +#include +#include +#include + #include #include #include @@ -41,11 +47,8 @@ using ::std::string_view; #include #include -#include -#include - namespace bsoncxx { -namespace v_noabi { +namespace v1 { namespace stdx { template > @@ -359,15 +362,14 @@ constexpr std::size_t basic_string_view::npos; using string_view = basic_string_view; } // namespace stdx -} // namespace v_noabi +} // namespace v1 } // namespace bsoncxx namespace std { template -struct hash> - : private std::hash> { - std::size_t operator()(bsoncxx::v_noabi::stdx::basic_string_view const& str) const { +struct hash> : private std::hash> { + std::size_t operator()(bsoncxx::v1::stdx::basic_string_view const& str) const { return std::hash>::operator()( std::basic_string(str.data(), str.size())); } @@ -379,16 +381,7 @@ struct hash> #error "Cannot find a valid polyfill for string_view" #endif -#include - -namespace bsoncxx { -namespace stdx { - -using ::bsoncxx::v_noabi::stdx::basic_string_view; -using ::bsoncxx::v_noabi::stdx::string_view; - -} // namespace stdx -} // namespace bsoncxx +#include /// /// @file @@ -396,7 +389,7 @@ using ::bsoncxx::v_noabi::stdx::string_view; /// /// @note The API and ABI compatibility of this polyfill is determined by polyfill build /// configuration variables and the `BSONCXX_POLY_USE_*` macros provided by @ref -/// bsoncxx/v_noabi/bsoncxx/config/config.hpp. +/// bsoncxx/v1/config/config.hpp. /// /// @see /// - [Choosing a C++17 Polyfill](https://www.mongodb.com/docs/languages/cpp/cpp-driver/current/polyfill-selection/) @@ -405,7 +398,7 @@ using ::bsoncxx::v_noabi::stdx::string_view; #if defined(BSONCXX_PRIVATE_DOXYGEN_PREPROCESSOR) namespace bsoncxx { -namespace v_noabi { +namespace v1 { namespace stdx { /// @@ -413,12 +406,12 @@ namespace stdx { /// /// @note The API and ABI compatibility of this polyfill is determined by polyfill build /// configuration variables and the `BSONCXX_POLY_USE_*` macros provided by @ref -/// bsoncxx/v_noabi/bsoncxx/config/config.hpp. +/// bsoncxx/v1/config/config.hpp. /// class string_view {}; } // namespace stdx -} // namespace v_noabi +} // namespace v1 } // namespace bsoncxx #endif // defined(BSONCXX_PRIVATE_DOXYGEN_PREPROCESSOR) diff --git a/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/config/compiler.hpp b/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/config/compiler.hpp index 2634d3ab41..6773bf02d5 100644 --- a/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/config/compiler.hpp +++ b/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/config/compiler.hpp @@ -12,33 +12,12 @@ // See the License for the specific language governing permissions and // limitations under the License. -// clang-format off - -#define BSONCXX_IF_MSVC(...) -#define BSONCXX_IF_GCC(...) -#define BSONCXX_IF_CLANG(...) -#define BSONCXX_IF_GNU_LIKE(...) \ - BSONCXX_IF_GCC(__VA_ARGS__) \ - BSONCXX_IF_CLANG(__VA_ARGS__) - -#ifdef __GNUC__ - #ifdef __clang__ - #undef BSONCXX_IF_CLANG - #define BSONCXX_IF_CLANG(...) __VA_ARGS__ - #else - #undef BSONCXX_IF_GCC - #define BSONCXX_IF_GCC(...) __VA_ARGS__ - #endif -#elif defined(_MSC_VER) - #undef BSONCXX_IF_MSVC - #define BSONCXX_IF_MSVC(...) __VA_ARGS__ -#endif - -// clang-format on +// For backward compatibility. +#include /// /// @file -/// Provides macros for internal use. +/// For internal use only! /// /// @warning For internal use only! /// diff --git a/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/config/postlude.hpp b/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/config/postlude.hpp index adf5cbc5a9..1c4ad7f567 100644 --- a/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/config/postlude.hpp +++ b/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/config/postlude.hpp @@ -12,39 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -// prelude.hpp -#undef BSONCXX_UNREACHABLE -#pragma pop_macro("BSONCXX_UNREACHABLE") - -#pragma pop_macro("bsoncxx_cxx14_constexpr") -#pragma pop_macro("BSONCXX_RETURNS") - -// util.hpp -#pragma pop_macro("BSONCXX_PUSH_WARNINGS") -#pragma pop_macro("BSONCXX_POP_WARNINGS") -#pragma pop_macro("BSONCXX_DISABLE_WARNING") - -#pragma pop_macro("_bsoncxxDisableWarningImpl_for_MSVC") -#pragma pop_macro("_bsoncxxDisableWarningImpl_for_GCC") -#pragma pop_macro("_bsoncxxDisableWarningImpl_for_GNU") -#pragma pop_macro("_bsoncxxDisableWarningImpl_for_Clang") - -#pragma pop_macro("BSONCXX_CONCAT") -#pragma pop_macro("BSONCXX_CONCAT_IMPL") - -#pragma pop_macro("BSONCXX_PRAGMA") -#pragma pop_macro("_bsoncxxPragma") -#pragma pop_macro("BSONCXX_STRINGIFY_IMPL") -#pragma pop_macro("BSONCXX_STRINGIFY") -#pragma pop_macro("BSONCXX_FORCE_SEMICOLON") - -#pragma pop_macro("BSONCXX_IF_MSVC") -#pragma pop_macro("BSONCXX_IF_GCC") -#pragma pop_macro("BSONCXX_IF_CLANG") -#pragma pop_macro("BSONCXX_IF_GNU_LIKE") - -#pragma pop_macro("BSONCXX_FWD") - #include /// diff --git a/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/config/prelude.hpp b/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/config/prelude.hpp index 7512b111ef..80a018cb74 100644 --- a/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/config/prelude.hpp +++ b/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/config/prelude.hpp @@ -14,63 +14,12 @@ #include -// util.hpp -#pragma push_macro("BSONCXX_CONCAT") -#undef BSONCXX_CONCAT -#pragma push_macro("BSONCXX_CONCAT_IMPL") -#undef BSONCXX_CONCAT_IMPL -#pragma push_macro("BSONCXX_STRINGIFY") -#undef BSONCXX_STRINGIFY -#pragma push_macro("BSONCXX_STRINGIFY_IMPL") -#undef BSONCXX_STRINGIFY_IMPL -#pragma push_macro("BSONCXX_PRAGMA") -#undef BSONCXX_PRAGMA -#pragma push_macro("_bsoncxxPragma") -#undef _bsoncxxPragma -#pragma push_macro("BSONCXX_FORCE_SEMICOLON") -#undef BSONCXX_FORCE_SEMICOLON -#pragma push_macro("BSONCXX_RETURNS") -#undef BSONCXX_RETURNS -#pragma push_macro("bsoncxx_cxx14_constexpr") -#undef bsoncxx_cxx14_constexpr -#pragma push_macro("BSONCXX_DISABLE_WARNING") -#undef BSONCXX_DISABLE_WARNING -#pragma push_macro("BSONCXX_PUSH_WARNINGS") -#undef BSONCXX_PUSH_WARNINGS -#pragma push_macro("BSONCXX_POP_WARNINGS") -#undef BSONCXX_POP_WARNINGS -#pragma push_macro("_bsoncxxDisableWarningImpl_for_GCC") -#undef _bsoncxxDisableWarningImpl_for_GCC -#pragma push_macro("_bsoncxxDisableWarningImpl_for_Clang") -#undef _bsoncxxDisableWarningImpl_for_Clang -#pragma push_macro("_bsoncxxDisableWarningImpl_for_MSVC") -#undef _bsoncxxDisableWarningImpl_for_MSVC -#pragma push_macro("_bsoncxxDisableWarningImpl_for_GNU") -#undef _bsoncxxDisableWarningImpl_for_GNU -#pragma push_macro("BSONCXX_FWD") -#undef BSONCXX_FWD - -// compiler.hpp -#pragma push_macro("BSONCXX_IF_MSVC") -#undef BSONCXX_IF_MSVC -#pragma push_macro("BSONCXX_IF_GCC") -#undef BSONCXX_IF_GCC -#pragma push_macro("BSONCXX_IF_CLANG") -#undef BSONCXX_IF_CLANG -#pragma push_macro("BSONCXX_IF_GNU_LIKE") -#undef BSONCXX_IF_GNU_LIKE - -#include -// #include #include #include +#include #include -#pragma push_macro("BSONCXX_UNREACHABLE") -#undef BSONCXX_UNREACHABLE -#define BSONCXX_UNREACHABLE std::abort() - /// /// @file /// The bsoncxx v_noabi macro guard prelude header. diff --git a/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/config/util.hpp b/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/config/util.hpp new file mode 100644 index 0000000000..6773bf02d5 --- /dev/null +++ b/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/config/util.hpp @@ -0,0 +1,23 @@ +// 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. + +// For backward compatibility. +#include + +/// +/// @file +/// For internal use only! +/// +/// @warning For internal use only! +/// diff --git a/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/stdx/operators.hpp b/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/stdx/operators.hpp new file mode 100644 index 0000000000..b762d36c67 --- /dev/null +++ b/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/stdx/operators.hpp @@ -0,0 +1,25 @@ +// 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 + +// For backward compatibility. +#include + +/// +/// @file +/// For internal use only! +/// +/// @warning For internal use only! +/// diff --git a/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/stdx/optional.hpp b/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/stdx/optional.hpp new file mode 100644 index 0000000000..5b42bb84f8 --- /dev/null +++ b/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/stdx/optional.hpp @@ -0,0 +1,56 @@ +// 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 + +namespace bsoncxx { +namespace v_noabi { +namespace stdx { + +using v1::stdx::in_place; +using v1::stdx::in_place_t; +using v1::stdx::make_optional; +using v1::stdx::nullopt; +using v1::stdx::nullopt_t; +using v1::stdx::optional; + +} // namespace stdx +} // namespace v_noabi +} // namespace bsoncxx + +namespace bsoncxx { +namespace stdx { + +using v_noabi::stdx::in_place; +using v_noabi::stdx::in_place_t; +using v_noabi::stdx::make_optional; +using v_noabi::stdx::nullopt; +using v_noabi::stdx::nullopt_t; +using v_noabi::stdx::optional; + +} // namespace stdx +} // namespace bsoncxx + +/// +/// @file +/// Provides `std::optional`-related polyfills for library API usage. +/// +/// @par Includes +/// - @ref bsoncxx/v1/stdx/optional.hpp +/// +/// @see +/// - [Choosing a C++17 Polyfill](https://www.mongodb.com/docs/languages/cpp/cpp-driver/current/polyfill-selection/) +/// diff --git a/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/stdx/string_view.hpp b/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/stdx/string_view.hpp new file mode 100644 index 0000000000..334d9316aa --- /dev/null +++ b/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/stdx/string_view.hpp @@ -0,0 +1,48 @@ +// 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 + +namespace bsoncxx { +namespace v_noabi { +namespace stdx { + +using v1::stdx::basic_string_view; +using v1::stdx::string_view; + +} // namespace stdx +} // namespace v_noabi +} // namespace bsoncxx + +namespace bsoncxx { +namespace stdx { + +using v_noabi::stdx::basic_string_view; +using v_noabi::stdx::string_view; + +} // namespace stdx +} // namespace bsoncxx + +/// +/// @file +/// Provides `std::string_view`-related polyfills for library API usage. +/// +/// @par Includes +/// - @ref bsoncxx/v1/stdx/string_view.hpp +/// +/// @see +/// - [Choosing a C++17 Polyfill](https://www.mongodb.com/docs/languages/cpp/cpp-driver/current/polyfill-selection/) +/// diff --git a/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/stdx/type_traits.hpp b/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/stdx/type_traits.hpp new file mode 100644 index 0000000000..469833c1a0 --- /dev/null +++ b/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/stdx/type_traits.hpp @@ -0,0 +1,25 @@ +// 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 + +// For backward compatibility. +#include + +/// +/// @file +/// For internal use only! +/// +/// @warning For internal use only! +/// diff --git a/src/bsoncxx/test/CMakeLists.txt b/src/bsoncxx/test/CMakeLists.txt index b6aa7a78db..a4798fbb51 100644 --- a/src/bsoncxx/test/CMakeLists.txt +++ b/src/bsoncxx/test/CMakeLists.txt @@ -103,40 +103,40 @@ if(ENABLE_MACRO_GUARD_TESTS) BSONCXX_VERSION_MINOR BSONCXX_VERSION_PATCH - # bsoncxx/v1/detail/prelude.hpp - BSONCXX_PRIVATE_V1_INSIDE_MACRO_GUARD_SCOPE - - # prelude.hpp - BSONCXX_UNREACHABLE - - # util.hpp - _bsoncxxDisableWarningImpl_for_GCC - _bsoncxxDisableWarningImpl_for_GNU - _bsoncxxDisableWarningImpl_for_MSVC - _bsoncxxDisableWarningImpl_for_Clang - BSONCXX_PUSH_WARNINGS - BSONCXX_POP_WARNINGS - BSONCXX_DISABLE_WARNING + # bsoncxx/v1/detail/macros.hpp BSONCXX_CONCAT BSONCXX_CONCAT_IMPL - bsoncxx_cxx14_constexpr + BSONCXX_DISABLE_WARNING BSONCXX_FORCE_SEMICOLON BSONCXX_FWD - BSONCXX_PRAGMA - _bsoncxxPragma - BSONCXX_STRINGIFY - BSONCXX_STRINGIFY_IMPL - BSONCXX_IF_MSVC - BSONCXX_IF_GCC BSONCXX_IF_CLANG + BSONCXX_IF_GCC BSONCXX_IF_GNU_LIKE + BSONCXX_IF_MSVC + BSONCXX_POP_WARNINGS + BSONCXX_PRAGMA + BSONCXX_PUSH_WARNINGS BSONCXX_RETURNS + BSONCXX_STRINGIFY + BSONCXX_STRINGIFY_IMPL + BSONCXX_UNREACHABLE + _bsoncxxDisableWarningImpl_for_Clang + _bsoncxxDisableWarningImpl_for_GCC + _bsoncxxDisableWarningImpl_for_GNU + _bsoncxxDisableWarningImpl_for_MSVC + _bsoncxxPragma + bsoncxx_cxx14_constexpr + + # bsoncxx/v1/detail/prelude.hpp + BSONCXX_PRIVATE_V1_INSIDE_MACRO_GUARD_SCOPE + INCLUDE_PATTERNS "include/*.hpp" # Public headers. EXCLUDE_REGEXES "include/bsoncxx/docs/.*\.hpp" # Doc header. "include/.*/(prelude|postlude)\.hpp" # Macro guard headers. - "include/bsoncxx/v_noabi/bsoncxx/config/.*\.hpp" # v_noabi config headers. + "include/bsoncxx/v1/detail/macros\.hpp" # v1 private macros. + "include/bsoncxx/v_noabi/bsoncxx/config/.*\.hpp" # v_noabi include-via-prelude headers. "include/bsoncxx/v_noabi/bsoncxx/enums/.*\.hpp" # v_noabi X-macro headers. ) endif() diff --git a/src/mongocxx/include/mongocxx/v1/detail/macros.hpp b/src/mongocxx/include/mongocxx/v1/detail/macros.hpp new file mode 100644 index 0000000000..d78a74b8f6 --- /dev/null +++ b/src/mongocxx/include/mongocxx/v1/detail/macros.hpp @@ -0,0 +1,28 @@ +// 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. + +// Traditional include guard is required to support v_noabi include-via-prelude. +#if !defined(MONGOCXX_V1_DETAIL_MACROS_HPP) +#define MONGOCXX_V1_DETAIL_MACROS_HPP + +#define MONGOCXX_UNREACHABLE std::abort() + +#endif // !defined(MONGOCXX_V1_DETAIL_MACROS_HPP) + +/// +/// @file +/// For internal use only! +/// +/// @warning For internal use only! +/// diff --git a/src/mongocxx/include/mongocxx/v1/detail/postlude.hpp b/src/mongocxx/include/mongocxx/v1/detail/postlude.hpp index a19d8ebdd6..d9c67ae541 100644 --- a/src/mongocxx/include/mongocxx/v1/detail/postlude.hpp +++ b/src/mongocxx/include/mongocxx/v1/detail/postlude.hpp @@ -32,6 +32,12 @@ #pragma pop_macro("MONGOCXX_VERSION_PATCH") #endif +// mongocxx/v1/detail/macros.hpp +#pragma push_macro("MONGOCXX_V1_DETAIL_MACROS_HPP") +#if !defined(MONGOCXX_V1_DETAIL_MACROS_HPP) +#pragma pop_macro("MONGOCXX_UNREACHABLE") +#endif + #if !defined(MONGOCXX_PRIVATE_V1_INSIDE_MACRO_GUARD_SCOPE) #error "postlude header included without a matching prelude header" #endif diff --git a/src/mongocxx/include/mongocxx/v1/detail/prelude.hpp b/src/mongocxx/include/mongocxx/v1/detail/prelude.hpp index e8ef787608..9dfafd847e 100644 --- a/src/mongocxx/include/mongocxx/v1/detail/prelude.hpp +++ b/src/mongocxx/include/mongocxx/v1/detail/prelude.hpp @@ -46,6 +46,13 @@ #undef MONGOCXX_VERSION_PATCH #endif +// mongocxx/v1/detail/macros.hpp +#pragma push_macro("MONGOCXX_V1_DETAIL_MACROS_HPP") +#if !defined(MONGOCXX_V1_DETAIL_MACROS_HPP) +#pragma push_macro("MONGOCXX_UNREACHABLE") +#undef MONGOCXX_UNREACHABLE +#endif + /// /// @file /// The mongocxx v1 macro guard prelude header. diff --git a/src/mongocxx/include/mongocxx/v_noabi/mongocxx/config/postlude.hpp b/src/mongocxx/include/mongocxx/v_noabi/mongocxx/config/postlude.hpp index c018128179..744182ff8c 100644 --- a/src/mongocxx/include/mongocxx/v_noabi/mongocxx/config/postlude.hpp +++ b/src/mongocxx/include/mongocxx/v_noabi/mongocxx/config/postlude.hpp @@ -12,10 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -// prelude.hpp -#undef MONGOCXX_UNREACHABLE -#pragma pop_macro("MONGOCXX_UNREACHABLE") - #include /// diff --git a/src/mongocxx/include/mongocxx/v_noabi/mongocxx/config/prelude.hpp b/src/mongocxx/include/mongocxx/v_noabi/mongocxx/config/prelude.hpp index 2cabe8476f..1223052f33 100644 --- a/src/mongocxx/include/mongocxx/v_noabi/mongocxx/config/prelude.hpp +++ b/src/mongocxx/include/mongocxx/v_noabi/mongocxx/config/prelude.hpp @@ -19,11 +19,6 @@ #include #include -// TODO: Find a way to DRY this with BSONCXX_UNREACHABLE -#pragma push_macro("MONGOCXX_UNREACHABLE") -#undef MONGOCXX_UNREACHABLE -#define MONGOCXX_UNREACHABLE std::abort() - /// /// @file /// The mongocxx v_noabi macro guard prelude header. 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 3be859032b..6a9a916a98 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/gridfs/bucket.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/gridfs/bucket.cpp @@ -12,6 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +#include + #include #include #include diff --git a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/instance.cpp b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/instance.cpp index ada667b946..110aaac559 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/instance.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/instance.cpp @@ -12,6 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +#include + #include #include #include diff --git a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/client_session.hh b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/client_session.hh index 625f28acc1..f0bab3edd9 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/client_session.hh +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/client_session.hh @@ -14,6 +14,8 @@ #pragma once +#include + #include #include diff --git a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/conversions.cpp b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/conversions.cpp index 91cc4be6f1..e11b1ee717 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/conversions.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/conversions.cpp @@ -12,6 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +#include + #include #include 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 0b6a3667d0..8b6f6ec59e 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/validation_criteria.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/validation_criteria.cpp @@ -12,6 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +#include + #include #include 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 e3daf6ca46..d976698c12 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/write_concern.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/write_concern.cpp @@ -12,6 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +#include + #include #include #include diff --git a/src/mongocxx/test/CMakeLists.txt b/src/mongocxx/test/CMakeLists.txt index 8f6b514116..5f868d59c6 100644 --- a/src/mongocxx/test/CMakeLists.txt +++ b/src/mongocxx/test/CMakeLists.txt @@ -306,12 +306,12 @@ if(ENABLE_MACRO_GUARD_TESTS) MONGOCXX_VERSION_MINOR MONGOCXX_VERSION_PATCH + # mongocxx/v1/detail/macros.hpp + MONGOCXX_UNREACHABLE + # mongocxx/v1/detail/prelude.hpp MONGOCXX_PRIVATE_V1_INSIDE_MACRO_GUARD_SCOPE - # prelude.hpp - MONGOCXX_UNREACHABLE - # config.hh (generated by CMake) MONGOCXX_ENABLE_SSL MONGOCXX_COMPILER_ID @@ -321,6 +321,7 @@ if(ENABLE_MACRO_GUARD_TESTS) EXCLUDE_REGEXES "include/mongocxx/docs/.*\.hpp" # Doc header. "include/.*/(prelude|postlude)\.hpp" # Macro guard headers. + "include/mongocxx/v1/detail/macros\.hpp" # v_noabi include-via-prelude headers. "include/mongocxx/v_noabi/mongocxx/config/.*\.hpp" # v_noabi config headers. ) endif() diff --git a/src/mongocxx/test/client_side_encryption.cpp b/src/mongocxx/test/client_side_encryption.cpp index 36bb40d78e..1c00938cb6 100644 --- a/src/mongocxx/test/client_side_encryption.cpp +++ b/src/mongocxx/test/client_side_encryption.cpp @@ -12,6 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +#include + #include #include #include From 9f8b738fe4d4544df2ea2dff8691e944bbe39328 Mon Sep 17 00:00:00 2001 From: Ezra Chung Date: Fri, 10 Jan 2025 15:12:10 -0600 Subject: [PATCH 13/19] Use consistent prefix for private macros used in public headers --- .clang-format | 20 +-- examples/bsoncxx/getting_values.cpp | 4 +- .../include/bsoncxx/v1/detail/compare.hpp | 35 ++--- .../include/bsoncxx/v1/detail/macros.hpp | 100 ++++++++------- .../include/bsoncxx/v1/detail/postlude.hpp | 44 +++---- .../include/bsoncxx/v1/detail/prelude.hpp | 88 ++++++------- .../include/bsoncxx/v1/detail/type_traits.hpp | 14 +- .../include/bsoncxx/v1/stdx/optional.hpp | 121 +++++++++--------- .../include/bsoncxx/v1/stdx/string_view.hpp | 22 ++-- .../v_noabi/bsoncxx/document/value.hpp | 6 +- .../v_noabi/bsoncxx/exception/exception.hpp | 8 +- .../include/bsoncxx/v_noabi/bsoncxx/types.hpp | 6 +- .../v_noabi/bsoncxx/document/element.cpp | 2 +- .../lib/bsoncxx/v_noabi/bsoncxx/json.cpp | 4 +- .../v_noabi/bsoncxx/types/bson_value/view.cpp | 4 +- .../v_noabi/bsoncxx/types/private/convert.hh | 2 +- src/bsoncxx/test/CMakeLists.txt | 44 +++---- src/bsoncxx/test/catch.hh | 38 +++--- src/bsoncxx/test/optional.test.cpp | 16 +-- src/bsoncxx/test/type_traits.test.cpp | 6 +- .../include/mongocxx/v1/detail/macros.hpp | 2 +- .../include/mongocxx/v1/detail/postlude.hpp | 2 +- .../include/mongocxx/v1/detail/prelude.hpp | 4 +- .../v_noabi/mongocxx/exception/exception.hpp | 8 +- .../exception/operation_exception.hpp | 8 +- .../v_noabi/mongocxx/options/index.hpp | 8 +- .../v_noabi/mongocxx/gridfs/bucket.cpp | 2 +- .../mongocxx/v_noabi/mongocxx/instance.cpp | 2 +- .../mongocxx/private/client_session.hh | 2 +- .../v_noabi/mongocxx/private/conversions.cpp | 4 +- .../v_noabi/mongocxx/validation_criteria.cpp | 4 +- .../v_noabi/mongocxx/write_concern.cpp | 2 +- src/mongocxx/test/CMakeLists.txt | 2 +- src/mongocxx/test/client_helpers.cpp | 6 +- src/mongocxx/test/client_side_encryption.cpp | 6 +- .../test/spec/unified_tests/assert.cpp | 6 +- 36 files changed, 329 insertions(+), 323 deletions(-) diff --git a/.clang-format b/.clang-format index 53a87d4046..e75951136a 100644 --- a/.clang-format +++ b/.clang-format @@ -83,8 +83,8 @@ AttributeMacros: - BSONCXX_ABI_NO_EXPORT - BSONCXX_DEPRECATED - BSONCXX_ENUM - - BSONCXX_PRAGMA - - BSONCXX_RETURNS + - BSONCXX_PRIVATE_PRAGMA + - BSONCXX_PRIVATE_RETURNS - MONGOCXX_ABI_CDECL - MONGOCXX_ABI_EXPORT - MONGOCXX_ABI_NO_EXPORT @@ -294,14 +294,14 @@ SpacesInSquareBrackets: false Standard: Cpp11 StatementAttributeLikeMacros: [] StatementMacros: - - BSONCXX_DISABLE_WARNING - - BSONCXX_FORCE_SEMICOLON - - BSONCXX_IF_CLANG - - BSONCXX_IF_GCC - - BSONCXX_IF_GNU_LIKE - - BSONCXX_IF_MSVC - - BSONCXX_POP_WARNINGS - - BSONCXX_PUSH_WARNINGS + - BSONCXX_PRIVATE_FORCE_SEMICOLON + - BSONCXX_PRIVATE_IF_CLANG + - BSONCXX_PRIVATE_IF_GCC + - BSONCXX_PRIVATE_IF_GNU_LIKE + - BSONCXX_PRIVATE_IF_MSVC + - BSONCXX_PRIVATE_WARNINGS_DISABLE + - BSONCXX_PRIVATE_WARNINGS_POP + - BSONCXX_PRIVATE_WARNINGS_PUSH - BSONCXX_SUPPRESS_DEPRECATION_WARNINGS_BEGIN - BSONCXX_SUPPRESS_DEPRECATION_WARNINGS_END TableGenBreakInsideDAGArg: DontBreak diff --git a/examples/bsoncxx/getting_values.cpp b/examples/bsoncxx/getting_values.cpp index 36816bf666..cb450b3fde 100644 --- a/examples/bsoncxx/getting_values.cpp +++ b/examples/bsoncxx/getting_values.cpp @@ -72,7 +72,7 @@ int EXAMPLES_CDECL main() { auto invalid1 = doc["name"]["middle"]; auto invalid2 = doc["contribs"][1000]; if (invalid1 || invalid2) { - BSONCXX_UNREACHABLE; // Not reached. + return EXIT_FAILURE; // Not reached. } // Similarly, indexed access (either by string or numeric index) into a type that is not @@ -81,7 +81,7 @@ int EXAMPLES_CDECL main() { auto invalid3 = doc["_id"]["invalid"]; auto invalid4 = doc["name"][3]; if (invalid3 || invalid4) { - BSONCXX_UNREACHABLE; // Not reached. + return EXIT_FAILURE; // Not reached. } // Values are accessed through get_*() methods. diff --git a/src/bsoncxx/include/bsoncxx/v1/detail/compare.hpp b/src/bsoncxx/include/bsoncxx/v1/detail/compare.hpp index aa79ad1cc9..1189c20c74 100644 --- a/src/bsoncxx/include/bsoncxx/v1/detail/compare.hpp +++ b/src/bsoncxx/include/bsoncxx/v1/detail/compare.hpp @@ -29,13 +29,13 @@ namespace detail { template auto is_equality_comparable_f(...) -> std::false_type; -BSONCXX_PUSH_WARNINGS(); -BSONCXX_DISABLE_WARNING(GNU("-Wfloat-equal")); +BSONCXX_PRIVATE_WARNINGS_PUSH(); +BSONCXX_PRIVATE_WARNINGS_DISABLE(GNU("-Wfloat-equal")); template auto is_equality_comparable_f(int, bool b = false) -> true_t< decltype((std::declval() == std::declval()) ? 0 : 0, (std::declval() == std::declval()) ? 0 : 0, (std::declval() != std::declval()) ? 0 : 0, (std::declval() != std::declval()) ? 0 : 0)>; -BSONCXX_POP_WARNINGS(); +BSONCXX_PRIVATE_WARNINGS_POP(); // Detect whether two types are equality-comparable. // @@ -55,21 +55,21 @@ struct equal_to { // an ADL-only tag_invoke(equal_to, l, r). class equality_operators { template - constexpr static auto impl(rank<1>, L& l, R& r) BSONCXX_RETURNS(tag_invoke(equal_to{}, l, r)); + constexpr static auto impl(rank<1>, L& l, R& r) BSONCXX_PRIVATE_RETURNS(tag_invoke(equal_to{}, l, r)); template - constexpr static auto impl(rank<0>, L& l, R& r) BSONCXX_RETURNS(tag_invoke(equal_to{}, r, l)); + constexpr static auto impl(rank<0>, L& l, R& r) BSONCXX_PRIVATE_RETURNS(tag_invoke(equal_to{}, r, l)); // @cond DOXYGEN_DISABLE "Found ';' while parsing initializer list!" template constexpr friend auto operator==(Left const& self, Other const& other) - BSONCXX_RETURNS(equality_operators::impl(rank<1>{}, self, other)); + BSONCXX_PRIVATE_RETURNS(equality_operators::impl(rank<1>{}, self, other)); // @endcond // @cond DOXYGEN_DISABLE "Found ';' while parsing initializer list!" template constexpr friend auto operator!=(Left const& self, Other const& other) - BSONCXX_RETURNS(!equality_operators::impl(rank<1>{}, self, other)); + BSONCXX_PRIVATE_RETURNS(!equality_operators::impl(rank<1>{}, self, other)); // @endcond }; @@ -117,9 +117,9 @@ class strong_ordering { #pragma push_macro("INLINE_VAR") #undef INLINE_VAR -#define INLINE_VAR \ - BSONCXX_IF_GNU_LIKE([[gnu::weak]]) \ - BSONCXX_IF_MSVC(__declspec(selectany)) +#define INLINE_VAR \ + BSONCXX_PRIVATE_IF_GNU_LIKE([[gnu::weak]]) \ + BSONCXX_PRIVATE_IF_MSVC(__declspec(selectany)) INLINE_VAR const strong_ordering strong_ordering::less = strong_ordering(strong_ordering::_construct{}, -1); INLINE_VAR const strong_ordering strong_ordering::greater = strong_ordering(strong_ordering::_construct{}, 1); @@ -132,8 +132,8 @@ INLINE_VAR const strong_ordering strong_ordering::equal = strong_ordering(strong // a single operation, determine whether the left operand is less-than, greater-than, // or equal-to the right-hand operand. struct compare_three_way { - BSONCXX_PUSH_WARNINGS(); - BSONCXX_DISABLE_WARNING(GNU("-Wfloat-equal")); + BSONCXX_PRIVATE_WARNINGS_PUSH(); + BSONCXX_PRIVATE_WARNINGS_DISABLE(GNU("-Wfloat-equal")); template < typename L, typename R, @@ -142,7 +142,7 @@ struct compare_three_way { constexpr static strong_ordering impl(L const& l, R const& r, rank<1>) { return (l < r) ? strong_ordering::less : (l == r ? strong_ordering::equal : strong_ordering::greater); } - BSONCXX_POP_WARNINGS(); + BSONCXX_PRIVATE_WARNINGS_POP(); template < typename L, @@ -153,25 +153,26 @@ struct compare_three_way { } template - constexpr auto operator()(L const& l, R const& r) const BSONCXX_RETURNS((impl)(l, r, rank<2>{})); + constexpr auto operator()(L const& l, R const& r) const BSONCXX_PRIVATE_RETURNS((impl)(l, r, rank<2>{})); }; // Inherit to define ADL-visible ordering operators based on an ADL-visible // implementation of tag_invoke(compare_three_way, l, r). struct ordering_operators { template - constexpr static auto impl(L const& l, R const& r, rank<1>) BSONCXX_RETURNS(tag_invoke(compare_three_way{}, l, r)); + constexpr static auto impl(L const& l, R const& r, rank<1>) + BSONCXX_PRIVATE_RETURNS(tag_invoke(compare_three_way{}, l, r)); template constexpr static auto impl(L const& l, R const& r, rank<0>) - BSONCXX_RETURNS(tag_invoke(compare_three_way{}, r, l).inverted()); + BSONCXX_PRIVATE_RETURNS(tag_invoke(compare_three_way{}, r, l).inverted()); #pragma push_macro("DEFOP") #undef DEFOP #define DEFOP(Oper) \ template \ constexpr friend auto operator Oper(L const& l, R const& r) \ - BSONCXX_RETURNS(ordering_operators::impl(l, r, rank<1>{}) Oper nullptr) + BSONCXX_PRIVATE_RETURNS(ordering_operators::impl(l, r, rank<1>{}) Oper nullptr) DEFOP(<); DEFOP(>); DEFOP(<=); diff --git a/src/bsoncxx/include/bsoncxx/v1/detail/macros.hpp b/src/bsoncxx/include/bsoncxx/v1/detail/macros.hpp index bdb9bb3cd1..d70cba09c1 100644 --- a/src/bsoncxx/include/bsoncxx/v1/detail/macros.hpp +++ b/src/bsoncxx/include/bsoncxx/v1/detail/macros.hpp @@ -17,12 +17,12 @@ #define BSONCXX_V1_DETAIL_MACROS_HPP // Convert the given macro argument to a string literal, after macro expansion. -#define BSONCXX_STRINGIFY(...) BSONCXX_STRINGIFY_IMPL(__VA_ARGS__) -#define BSONCXX_STRINGIFY_IMPL(...) #__VA_ARGS__ +#define BSONCXX_PRIVATE_STRINGIFY(...) BSONCXX_PRIVATE_STRINGIFY_IMPL(__VA_ARGS__) +#define BSONCXX_PRIVATE_STRINGIFY_IMPL(...) #__VA_ARGS__ // Token-paste two macro arguments, after macro expansion -#define BSONCXX_CONCAT(A, ...) BSONCXX_CONCAT_IMPL(A, __VA_ARGS__) -#define BSONCXX_CONCAT_IMPL(A, ...) A##__VA_ARGS__ +#define BSONCXX_PRIVATE_CONCAT(A, ...) BSONCXX_PRIVATE_CONCAT_IMPL(A, __VA_ARGS__) +#define BSONCXX_PRIVATE_CONCAT_IMPL(A, ...) A##__VA_ARGS__ // Expands to a _Pragma() preprocessor directive, after macro expansion // @@ -31,24 +31,24 @@ // // Example: // -// BSONCXX_PRAGMA(GCC diagnostic ignore "-Wconversion") +// BSONCXX_PRIVATE_PRAGMA(GCC diagnostic ignore "-Wconversion") // // will become: // // _Pragma("GCC diagnostic ignore \"-Wconversion\"") // -#define BSONCXX_PRAGMA(...) _bsoncxxPragma(__VA_ARGS__) +#define BSONCXX_PRIVATE_PRAGMA(...) BSONCXX_PRIVATE_PRAGMA_IMPL(__VA_ARGS__) #ifdef _MSC_VER // Old MSVC doesn't recognize C++11 _Pragma(), but it always recognized __pragma -#define _bsoncxxPragma(...) __pragma(__VA_ARGS__) +#define BSONCXX_PRIVATE_PRAGMA_IMPL(...) __pragma(__VA_ARGS__) #else -#define _bsoncxxPragma(...) _Pragma(BSONCXX_STRINGIFY(__VA_ARGS__)) +#define BSONCXX_PRIVATE_PRAGMA_IMPL(...) _Pragma(BSONCXX_PRIVATE_STRINGIFY(__VA_ARGS__)) #endif // Use in a declaration position to force the appearence of a semicolon // as the next token. Use this for statement-like or declaration-like macros to // enforce that their call sites are followed by a semicolon -#define BSONCXX_FORCE_SEMICOLON static_assert(true, "") +#define BSONCXX_PRIVATE_FORCE_SEMICOLON static_assert(true, "") // Add a trailing noexcept, decltype-return, and return-body to a // function definition. (Not compatible with lambda expressions.) @@ -56,7 +56,7 @@ // Example: // // template -// auto foo(T x, T y) BSONCXX_RETURNS(x + y); +// auto foo(T x, T y) BSONCXX_PRIVATE_RETURNS(x + y); // // Becomes: // @@ -65,11 +65,11 @@ // -> decltype(x + y) // { return x + y }; // -#define BSONCXX_RETURNS(...) \ +#define BSONCXX_PRIVATE_RETURNS(...) \ noexcept(noexcept(__VA_ARGS__))->decltype(__VA_ARGS__) { \ return __VA_ARGS__; \ } \ - BSONCXX_FORCE_SEMICOLON + BSONCXX_PRIVATE_FORCE_SEMICOLON // @macro mongocxx_cxx14_constexpr // Expands to `constexpr` if compiling as c++14 or greater, otherwise @@ -78,30 +78,30 @@ // Use this on functions that can only be constexpr in C++14 or newer, including // non-const member functions. #if __cplusplus >= 201402L || (defined(_MSVC_LANG) && _MSVC_LANG >= 201402L && _MSC_VER > 1910) -#define bsoncxx_cxx14_constexpr constexpr +#define BSONCXX_PRIVATE_CONSTEXPR_CXX14 constexpr #else -#define bsoncxx_cxx14_constexpr inline +#define BSONCXX_PRIVATE_CONSTEXPR_CXX14 inline #endif -#define BSONCXX_IF_MSVC(...) -#define BSONCXX_IF_GCC(...) -#define BSONCXX_IF_CLANG(...) -#define BSONCXX_IF_GNU_LIKE(...) \ - BSONCXX_IF_GCC(__VA_ARGS__) \ - BSONCXX_IF_CLANG(__VA_ARGS__) +#define BSONCXX_PRIVATE_IF_MSVC(...) +#define BSONCXX_PRIVATE_IF_GCC(...) +#define BSONCXX_PRIVATE_IF_CLANG(...) +#define BSONCXX_PRIVATE_IF_GNU_LIKE(...) \ + BSONCXX_PRIVATE_IF_GCC(__VA_ARGS__) \ + BSONCXX_PRIVATE_IF_CLANG(__VA_ARGS__) // clang-format off #ifdef __GNUC__ #ifdef __clang__ - #undef BSONCXX_IF_CLANG - #define BSONCXX_IF_CLANG(...) __VA_ARGS__ + #undef BSONCXX_PRIVATE_IF_CLANG + #define BSONCXX_PRIVATE_IF_CLANG(...) __VA_ARGS__ #else - #undef BSONCXX_IF_GCC - #define BSONCXX_IF_GCC(...) __VA_ARGS__ + #undef BSONCXX_PRIVATE_IF_GCC + #define BSONCXX_PRIVATE_IF_GCC(...) __VA_ARGS__ #endif #elif defined(_MSC_VER) - #undef BSONCXX_IF_MSVC - #define BSONCXX_IF_MSVC(...) __VA_ARGS__ + #undef BSONCXX_PRIVATE_IF_MSVC + #define BSONCXX_PRIVATE_IF_MSVC(...) __VA_ARGS__ #endif // clang-format on @@ -115,38 +115,42 @@ // - MSVC() // // The "GNU" form applies to both GCC and Clang -#define BSONCXX_DISABLE_WARNING(Spec) \ - BSONCXX_CONCAT(_bsoncxxDisableWarningImpl_for_, Spec) \ - BSONCXX_FORCE_SEMICOLON +#define BSONCXX_PRIVATE_WARNINGS_DISABLE(Spec) \ + BSONCXX_PRIVATE_CONCAT(BSONCXX_PRIVATE_WARNINGS_DISABLE_IMPL_FOR_, Spec) \ + BSONCXX_PRIVATE_FORCE_SEMICOLON // Push the current compiler diagnostics settings state -#define BSONCXX_PUSH_WARNINGS() \ - BSONCXX_IF_GNU_LIKE(BSONCXX_PRAGMA(GCC diagnostic push)) \ - BSONCXX_IF_MSVC(BSONCXX_PRAGMA(warning(push))) \ - BSONCXX_FORCE_SEMICOLON +#define BSONCXX_PRIVATE_WARNINGS_PUSH() \ + BSONCXX_PRIVATE_IF_GNU_LIKE(BSONCXX_PRIVATE_PRAGMA(GCC diagnostic push)) \ + BSONCXX_PRIVATE_IF_MSVC(BSONCXX_PRIVATE_PRAGMA(warning(push))) \ + BSONCXX_PRIVATE_FORCE_SEMICOLON // Restore prior compiler diagnostics settings from before the most -// recent BSONCXX_PUSH_WARNINGS() -#define BSONCXX_POP_WARNINGS() \ - BSONCXX_IF_GNU_LIKE(BSONCXX_PRAGMA(GCC diagnostic pop)) \ - BSONCXX_IF_MSVC(BSONCXX_PRAGMA(warning(pop))) \ - BSONCXX_FORCE_SEMICOLON +// recent BSONCXX_PRIVATE_WARNINGS_PUSH() +#define BSONCXX_PRIVATE_WARNINGS_POP() \ + BSONCXX_PRIVATE_IF_GNU_LIKE(BSONCXX_PRIVATE_PRAGMA(GCC diagnostic pop)) \ + BSONCXX_PRIVATE_IF_MSVC(BSONCXX_PRIVATE_PRAGMA(warning(pop))) \ + BSONCXX_PRIVATE_FORCE_SEMICOLON -#define _bsoncxxDisableWarningImpl_for_GCC(...) BSONCXX_IF_GCC(BSONCXX_PRAGMA(GCC diagnostic ignored __VA_ARGS__)) +#define BSONCXX_PRIVATE_WARNINGS_DISABLE_IMPL_FOR_GCC(...) \ + BSONCXX_PRIVATE_IF_GCC(BSONCXX_PRIVATE_PRAGMA(GCC diagnostic ignored __VA_ARGS__)) -#define _bsoncxxDisableWarningImpl_for_Clang(...) BSONCXX_IF_CLANG(BSONCXX_PRAGMA(GCC diagnostic ignored __VA_ARGS__)) +#define BSONCXX_PRIVATE_WARNINGS_DISABLE_IMPL_FOR_Clang(...) \ + BSONCXX_PRIVATE_IF_CLANG(BSONCXX_PRIVATE_PRAGMA(GCC diagnostic ignored __VA_ARGS__)) -#define _bsoncxxDisableWarningImpl_for_GNU(...) \ - _bsoncxxDisableWarningImpl_for_GCC(__VA_ARGS__) _bsoncxxDisableWarningImpl_for_Clang(__VA_ARGS__) +#define BSONCXX_PRIVATE_WARNINGS_DISABLE_IMPL_FOR_GNU(...) \ + BSONCXX_PRIVATE_WARNINGS_DISABLE_IMPL_FOR_GCC(__VA_ARGS__) \ + BSONCXX_PRIVATE_WARNINGS_DISABLE_IMPL_FOR_Clang(__VA_ARGS__) -#define _bsoncxxDisableWarningImpl_for_MSVC(...) BSONCXX_IF_MSVC(BSONCXX_PRAGMA(warning(disable : __VA_ARGS__))) +#define BSONCXX_PRIVATE_WARNINGS_DISABLE_IMPL_FOR_MSVC(...) \ + BSONCXX_PRIVATE_IF_MSVC(BSONCXX_PRIVATE_PRAGMA(warning(disable : __VA_ARGS__))) -#define BSONCXX_FWD(...) static_cast(__VA_ARGS__) +#define BSONCXX_PRIVATE_FWD(...) static_cast(__VA_ARGS__) -#define BSONCXX_UNREACHABLE \ - if (1) { \ - std::abort(); \ - } else \ +#define BSONCXX_PRIVATE_UNREACHABLE \ + if (1) { \ + std::abort(); \ + } else \ ((void)0) #endif // BSONCXX_V1_DETAIL_MACROS_HPP diff --git a/src/bsoncxx/include/bsoncxx/v1/detail/postlude.hpp b/src/bsoncxx/include/bsoncxx/v1/detail/postlude.hpp index faf90e2bf1..6174815215 100644 --- a/src/bsoncxx/include/bsoncxx/v1/detail/postlude.hpp +++ b/src/bsoncxx/include/bsoncxx/v1/detail/postlude.hpp @@ -42,28 +42,28 @@ // bsoncxx/v1/detail/macros.hpp #pragma pop_macro("BSONCXX_V1_DETAIL_MACROS_HPP") #if !defined(BSONCXX_V1_DETAIL_MACROS_HPP) -#pragma pop_macro("BSONCXX_CONCAT") -#pragma pop_macro("BSONCXX_CONCAT_IMPL") -#pragma pop_macro("BSONCXX_DISABLE_WARNING") -#pragma pop_macro("BSONCXX_FORCE_SEMICOLON") -#pragma pop_macro("BSONCXX_FWD") -#pragma pop_macro("BSONCXX_IF_CLANG") -#pragma pop_macro("BSONCXX_IF_GCC") -#pragma pop_macro("BSONCXX_IF_GNU_LIKE") -#pragma pop_macro("BSONCXX_IF_MSVC") -#pragma pop_macro("BSONCXX_POP_WARNINGS") -#pragma pop_macro("BSONCXX_PRAGMA") -#pragma pop_macro("BSONCXX_PUSH_WARNINGS") -#pragma pop_macro("BSONCXX_RETURNS") -#pragma pop_macro("BSONCXX_STRINGIFY") -#pragma pop_macro("BSONCXX_STRINGIFY_IMPL") -#pragma pop_macro("BSONCXX_UNREACHABLE") -#pragma pop_macro("_bsoncxxDisableWarningImpl_for_Clang") -#pragma pop_macro("_bsoncxxDisableWarningImpl_for_GCC") -#pragma pop_macro("_bsoncxxDisableWarningImpl_for_GNU") -#pragma pop_macro("_bsoncxxDisableWarningImpl_for_MSVC") -#pragma pop_macro("_bsoncxxPragma") -#pragma pop_macro("bsoncxx_cxx14_constexpr") +#pragma pop_macro("BSONCXX_PRIVATE_CONCAT_IMPL") +#pragma pop_macro("BSONCXX_PRIVATE_CONCAT") +#pragma pop_macro("BSONCXX_PRIVATE_CONSTEXPR_CXX14") +#pragma pop_macro("BSONCXX_PRIVATE_FORCE_SEMICOLON") +#pragma pop_macro("BSONCXX_PRIVATE_FWD") +#pragma pop_macro("BSONCXX_PRIVATE_IF_CLANG") +#pragma pop_macro("BSONCXX_PRIVATE_IF_GCC") +#pragma pop_macro("BSONCXX_PRIVATE_IF_GNU_LIKE") +#pragma pop_macro("BSONCXX_PRIVATE_IF_MSVC") +#pragma pop_macro("BSONCXX_PRIVATE_PRAGMA_IMPL") +#pragma pop_macro("BSONCXX_PRIVATE_PRAGMA") +#pragma pop_macro("BSONCXX_PRIVATE_RETURNS") +#pragma pop_macro("BSONCXX_PRIVATE_STRINGIFY_IMPL") +#pragma pop_macro("BSONCXX_PRIVATE_STRINGIFY") +#pragma pop_macro("BSONCXX_PRIVATE_UNREACHABLE") +#pragma pop_macro("BSONCXX_PRIVATE_WARNINGS_DISABLE_IMPL_FOR_Clang") +#pragma pop_macro("BSONCXX_PRIVATE_WARNINGS_DISABLE_IMPL_FOR_GCC") +#pragma pop_macro("BSONCXX_PRIVATE_WARNINGS_DISABLE_IMPL_FOR_GNU") +#pragma pop_macro("BSONCXX_PRIVATE_WARNINGS_DISABLE_IMPL_FOR_MSVC") +#pragma pop_macro("BSONCXX_PRIVATE_WARNINGS_DISABLE") +#pragma pop_macro("BSONCXX_PRIVATE_WARNINGS_POP") +#pragma pop_macro("BSONCXX_PRIVATE_WARNINGS_PUSH") #endif #if !defined(BSONCXX_PRIVATE_V1_INSIDE_MACRO_GUARD_SCOPE) diff --git a/src/bsoncxx/include/bsoncxx/v1/detail/prelude.hpp b/src/bsoncxx/include/bsoncxx/v1/detail/prelude.hpp index f5a2388d4d..1a26c3494f 100644 --- a/src/bsoncxx/include/bsoncxx/v1/detail/prelude.hpp +++ b/src/bsoncxx/include/bsoncxx/v1/detail/prelude.hpp @@ -58,50 +58,50 @@ // bsoncxx/v1/detail/macros.hpp #pragma push_macro("BSONCXX_V1_DETAIL_MACROS_HPP") #if !defined(BSONCXX_V1_DETAIL_MACROS_HPP) -#pragma push_macro("BSONCXX_CONCAT") -#undef BSONCXX_CONCAT -#pragma push_macro("BSONCXX_CONCAT_IMPL") -#undef BSONCXX_CONCAT_IMPL -#pragma push_macro("BSONCXX_DISABLE_WARNING") -#undef BSONCXX_DISABLE_WARNING -#pragma push_macro("BSONCXX_FORCE_SEMICOLON") -#undef BSONCXX_FORCE_SEMICOLON -#pragma push_macro("BSONCXX_FWD") -#undef BSONCXX_FWD -#pragma push_macro("BSONCXX_IF_CLANG") -#undef BSONCXX_IF_CLANG -#pragma push_macro("BSONCXX_IF_GCC") -#undef BSONCXX_IF_GCC -#pragma push_macro("BSONCXX_IF_GNU_LIKE") -#undef BSONCXX_IF_GNU_LIKE -#pragma push_macro("BSONCXX_IF_MSVC") -#undef BSONCXX_IF_MSVC -#pragma push_macro("BSONCXX_POP_WARNINGS") -#undef BSONCXX_POP_WARNINGS -#pragma push_macro("BSONCXX_PRAGMA") -#undef BSONCXX_PRAGMA -#pragma push_macro("BSONCXX_PUSH_WARNINGS") -#undef BSONCXX_PUSH_WARNINGS -#pragma push_macro("BSONCXX_RETURNS") -#undef BSONCXX_RETURNS -#pragma push_macro("BSONCXX_STRINGIFY") -#undef BSONCXX_STRINGIFY -#pragma push_macro("BSONCXX_STRINGIFY_IMPL") -#undef BSONCXX_STRINGIFY_IMPL -#pragma push_macro("BSONCXX_UNREACHABLE") -#undef BSONCXX_UNREACHABLE -#pragma push_macro("_bsoncxxDisableWarningImpl_for_Clang") -#undef _bsoncxxDisableWarningImpl_for_Clang -#pragma push_macro("_bsoncxxDisableWarningImpl_for_GCC") -#undef _bsoncxxDisableWarningImpl_for_GCC -#pragma push_macro("_bsoncxxDisableWarningImpl_for_GNU") -#undef _bsoncxxDisableWarningImpl_for_GNU -#pragma push_macro("_bsoncxxDisableWarningImpl_for_MSVC") -#undef _bsoncxxDisableWarningImpl_for_MSVC -#pragma push_macro("_bsoncxxPragma") -#undef _bsoncxxPragma -#pragma push_macro("bsoncxx_cxx14_constexpr") -#undef bsoncxx_cxx14_constexpr +#pragma push_macro("BSONCXX_PRIVATE_CONCAT") +#undef BSONCXX_PRIVATE_CONCAT +#pragma push_macro("BSONCXX_PRIVATE_CONCAT_IMPL") +#undef BSONCXX_PRIVATE_CONCAT_IMPL +#pragma push_macro("BSONCXX_PRIVATE_CONSTEXPR_CXX14") +#undef BSONCXX_PRIVATE_CONSTEXPR_CXX14 +#pragma push_macro("BSONCXX_PRIVATE_FORCE_SEMICOLON") +#undef BSONCXX_PRIVATE_FORCE_SEMICOLON +#pragma push_macro("BSONCXX_PRIVATE_FWD") +#undef BSONCXX_PRIVATE_FWD +#pragma push_macro("BSONCXX_PRIVATE_IF_CLANG") +#undef BSONCXX_PRIVATE_IF_CLANG +#pragma push_macro("BSONCXX_PRIVATE_IF_GCC") +#undef BSONCXX_PRIVATE_IF_GCC +#pragma push_macro("BSONCXX_PRIVATE_IF_GNU_LIKE") +#undef BSONCXX_PRIVATE_IF_GNU_LIKE +#pragma push_macro("BSONCXX_PRIVATE_IF_MSVC") +#undef BSONCXX_PRIVATE_IF_MSVC +#pragma push_macro("BSONCXX_PRIVATE_PRAGMA") +#undef BSONCXX_PRIVATE_PRAGMA +#pragma push_macro("BSONCXX_PRIVATE_PRAGMA_IMPL") +#undef BSONCXX_PRIVATE_PRAGMA_IMPL +#pragma push_macro("BSONCXX_PRIVATE_RETURNS") +#undef BSONCXX_PRIVATE_RETURNS +#pragma push_macro("BSONCXX_PRIVATE_STRINGIFY") +#undef BSONCXX_PRIVATE_STRINGIFY +#pragma push_macro("BSONCXX_PRIVATE_STRINGIFY_IMPL") +#undef BSONCXX_PRIVATE_STRINGIFY_IMPL +#pragma push_macro("BSONCXX_PRIVATE_WARNINGS_DISABLE_IMPL_FOR_Clang") +#undef BSONCXX_PRIVATE_WARNINGS_DISABLE_IMPL_FOR_Clang +#pragma push_macro("BSONCXX_PRIVATE_WARNINGS_DISABLE_IMPL_FOR_GCC") +#undef BSONCXX_PRIVATE_WARNINGS_DISABLE_IMPL_FOR_GCC +#pragma push_macro("BSONCXX_PRIVATE_WARNINGS_DISABLE_IMPL_FOR_GNU") +#undef BSONCXX_PRIVATE_WARNINGS_DISABLE_IMPL_FOR_GNU +#pragma push_macro("BSONCXX_PRIVATE_WARNINGS_DISABLE_IMPL_FOR_MSVC") +#undef BSONCXX_PRIVATE_WARNINGS_DISABLE_IMPL_FOR_MSVC +#pragma push_macro("BSONCXX_PRIVATE_WARNINGS_DISABLE") +#undef BSONCXX_PRIVATE_WARNINGS_DISABLE +#pragma push_macro("BSONCXX_PRIVATE_WARNINGS_POP") +#undef BSONCXX_PRIVATE_WARNINGS_POP +#pragma push_macro("BSONCXX_PRIVATE_WARNINGS_PUSH") +#undef BSONCXX_PRIVATE_WARNINGS_PUSH +#pragma push_macro("BSONCXX_PRIVATE_UNREACHABLE") +#undef BSONCXX_PRIVATE_UNREACHABLE #endif /// diff --git a/src/bsoncxx/include/bsoncxx/v1/detail/type_traits.hpp b/src/bsoncxx/include/bsoncxx/v1/detail/type_traits.hpp index cca3727697..701b828271 100644 --- a/src/bsoncxx/include/bsoncxx/v1/detail/type_traits.hpp +++ b/src/bsoncxx/include/bsoncxx/v1/detail/type_traits.hpp @@ -352,20 +352,20 @@ template struct invoker { template constexpr static auto apply(F&& fun, Args&&... args) - BSONCXX_RETURNS(static_cast(fun)(static_cast(args)...)); + BSONCXX_PRIVATE_RETURNS(static_cast(fun)(static_cast(args)...)); }; template <> struct invoker { template constexpr static auto apply(F&& fun, Self&& self, Args&&... args) - BSONCXX_RETURNS((static_cast(self).*fun)(static_cast(args)...)); + BSONCXX_PRIVATE_RETURNS((static_cast(self).*fun)(static_cast(args)...)); }; template <> struct invoker { template - constexpr static auto apply(F&& fun, Self&& self) BSONCXX_RETURNS(static_cast(self).*fun); + constexpr static auto apply(F&& fun, Self&& self) BSONCXX_PRIVATE_RETURNS(static_cast(self).*fun); }; } // namespace impl_invoke @@ -378,10 +378,10 @@ static constexpr struct invoke_fn { // @cond DOXYGEN_DISABLE "Found ';' while parsing initializer list!" template > constexpr auto operator()(F&& fn, Args&&... args) const - BSONCXX_RETURNS(impl_invoke::invoker< - std::is_member_object_pointer::value, - std::is_member_function_pointer< - Fd>::value>::apply(static_cast(fn), static_cast(args)...)); + BSONCXX_PRIVATE_RETURNS(impl_invoke::invoker< + std::is_member_object_pointer::value, + std::is_member_function_pointer< + Fd>::value>::apply(static_cast(fn), static_cast(args)...)); // @endcond } invoke; diff --git a/src/bsoncxx/include/bsoncxx/v1/stdx/optional.hpp b/src/bsoncxx/include/bsoncxx/v1/stdx/optional.hpp index 631aa84108..98a09cbb03 100644 --- a/src/bsoncxx/include/bsoncxx/v1/stdx/optional.hpp +++ b/src/bsoncxx/include/bsoncxx/v1/stdx/optional.hpp @@ -62,8 +62,8 @@ namespace stdx { template class optional; -BSONCXX_PUSH_WARNINGS(); -BSONCXX_DISABLE_WARNING(Clang("-Wweak-vtables")); +BSONCXX_PRIVATE_WARNINGS_PUSH(); +BSONCXX_PRIVATE_WARNINGS_DISABLE(Clang("-Wweak-vtables")); // Exception type thrown upon attempted access to a value-less optional via a throwing accessor // API. class bad_optional_access : public std::exception { @@ -72,7 +72,7 @@ class bad_optional_access : public std::exception { return "bad_optional_access()"; } }; -BSONCXX_POP_WARNINGS(); +BSONCXX_PRIVATE_WARNINGS_POP(); // Tag type to represent an empty optional value. struct nullopt_t { @@ -173,14 +173,15 @@ class optional : bsoncxx::detail::equality_operators, // In-place constructors template - bsoncxx_cxx14_constexpr explicit optional(in_place_t, Args&&... args) noexcept(noexcept(T(BSONCXX_FWD(args)...))) { - this->emplace(BSONCXX_FWD(args)...); + BSONCXX_PRIVATE_CONSTEXPR_CXX14 explicit optional(in_place_t, Args&&... args) noexcept( + noexcept(T(BSONCXX_PRIVATE_FWD(args)...))) { + this->emplace(BSONCXX_PRIVATE_FWD(args)...); } template - bsoncxx_cxx14_constexpr explicit optional(in_place_t, std::initializer_list il, Args&&... args) noexcept( - noexcept(T(il, BSONCXX_FWD(args)...))) { - this->emplace(il, BSONCXX_FWD(args)...); + BSONCXX_PRIVATE_CONSTEXPR_CXX14 explicit optional(in_place_t, std::initializer_list il, Args&&... args) noexcept( + noexcept(T(il, BSONCXX_PRIVATE_FWD(args)...))) { + this->emplace(il, BSONCXX_PRIVATE_FWD(args)...); } // Explicit converting constructor. Only available if implicit conversion is @@ -191,16 +192,16 @@ class optional : bsoncxx::detail::equality_operators, int, detail::enable_opt_value_conversion, bsoncxx::detail::negation>> = 0> - bsoncxx_cxx14_constexpr explicit optional(U&& arg) noexcept(std::is_nothrow_constructible::value) - : optional(in_place, BSONCXX_FWD(arg)) {} + BSONCXX_PRIVATE_CONSTEXPR_CXX14 explicit optional(U&& arg) noexcept(std::is_nothrow_constructible::value) + : optional(in_place, BSONCXX_PRIVATE_FWD(arg)) {} // Implicit converting constructor. Only available if implicit conversion is // possible. template < typename U = T, bsoncxx::detail::requires_t, std::is_convertible> = 0> - bsoncxx_cxx14_constexpr optional(U&& arg) noexcept(std::is_nothrow_constructible::value) - : optional(in_place, BSONCXX_FWD(arg)) {} + BSONCXX_PRIVATE_CONSTEXPR_CXX14 optional(U&& arg) noexcept(std::is_nothrow_constructible::value) + : optional(in_place, BSONCXX_PRIVATE_FWD(arg)) {} template < typename U, @@ -208,7 +209,7 @@ class optional : bsoncxx::detail::equality_operators, int, detail::enable_opt_conversion, bsoncxx::detail::negation>> = 0> - bsoncxx_cxx14_constexpr explicit optional(optional const& other) noexcept( + BSONCXX_PRIVATE_CONSTEXPR_CXX14 explicit optional(optional const& other) noexcept( std::is_nothrow_constructible>::value) { if (other.has_value()) { this->emplace(*other); @@ -221,7 +222,7 @@ class optional : bsoncxx::detail::equality_operators, int, detail::enable_opt_conversion, std::is_convertible> = 0> - bsoncxx_cxx14_constexpr optional(optional const& other) noexcept( + BSONCXX_PRIVATE_CONSTEXPR_CXX14 optional(optional const& other) noexcept( std::is_nothrow_constructible>::value) { if (other.has_value()) { this->emplace(*other); @@ -234,20 +235,20 @@ class optional : bsoncxx::detail::equality_operators, int, detail::enable_opt_conversion, bsoncxx::detail::negation>> = 0> - bsoncxx_cxx14_constexpr explicit optional(optional&& other) noexcept( + BSONCXX_PRIVATE_CONSTEXPR_CXX14 explicit optional(optional&& other) noexcept( std::is_nothrow_constructible>::value) { if (other.has_value()) { - this->emplace(*BSONCXX_FWD(other)); + this->emplace(*BSONCXX_PRIVATE_FWD(other)); } } template < typename U, bsoncxx::detail::requires_t, std::is_convertible> = 0> - bsoncxx_cxx14_constexpr optional(optional&& other) noexcept( + BSONCXX_PRIVATE_CONSTEXPR_CXX14 optional(optional&& other) noexcept( std::is_nothrow_constructible>::value) { if (other.has_value()) { - this->emplace(*BSONCXX_FWD(other)); + this->emplace(*BSONCXX_PRIVATE_FWD(other)); } } @@ -260,49 +261,49 @@ class optional : bsoncxx::detail::equality_operators, // Unchecked dereference operators. - bsoncxx_cxx14_constexpr reference operator*() & noexcept { + BSONCXX_PRIVATE_CONSTEXPR_CXX14 reference operator*() & noexcept { _assert_has_value("operator*() &"); return this->_storage.value; } - bsoncxx_cxx14_constexpr const_reference operator*() const& noexcept { + BSONCXX_PRIVATE_CONSTEXPR_CXX14 const_reference operator*() const& noexcept { _assert_has_value("operator*() const&"); return this->_storage.value; } - bsoncxx_cxx14_constexpr rvalue_reference operator*() && noexcept { + BSONCXX_PRIVATE_CONSTEXPR_CXX14 rvalue_reference operator*() && noexcept { _assert_has_value("operator*() &&"); return static_cast(**this); } - bsoncxx_cxx14_constexpr const_rvalue_reference operator*() const&& noexcept { + BSONCXX_PRIVATE_CONSTEXPR_CXX14 const_rvalue_reference operator*() const&& noexcept { _assert_has_value("operator*() const&&"); return static_cast(**this); } // (Unchecked) member-access operators. - bsoncxx_cxx14_constexpr pointer operator->() noexcept { + BSONCXX_PRIVATE_CONSTEXPR_CXX14 pointer operator->() noexcept { _assert_has_value("operator->()"); return std::addressof(**this); } - bsoncxx_cxx14_constexpr const_pointer operator->() const noexcept { + BSONCXX_PRIVATE_CONSTEXPR_CXX14 const_pointer operator->() const noexcept { _assert_has_value("operator->() const"); return std::addressof(**this); } // Checked accessors. - bsoncxx_cxx14_constexpr reference value() & { + BSONCXX_PRIVATE_CONSTEXPR_CXX14 reference value() & { _throw_if_empty(); return **this; } - bsoncxx_cxx14_constexpr const_reference value() const& { + BSONCXX_PRIVATE_CONSTEXPR_CXX14 const_reference value() const& { _throw_if_empty(); return **this; } - bsoncxx_cxx14_constexpr rvalue_reference value() && { + BSONCXX_PRIVATE_CONSTEXPR_CXX14 rvalue_reference value() && { _throw_if_empty(); return static_cast(**this); } - bsoncxx_cxx14_constexpr const_rvalue_reference value() const&& { + BSONCXX_PRIVATE_CONSTEXPR_CXX14 const_rvalue_reference value() const&& { _throw_if_empty(); return static_cast(**this); } @@ -310,31 +311,31 @@ class optional : bsoncxx::detail::equality_operators, // Checked value-or-alternative. template - bsoncxx_cxx14_constexpr value_type value_or(U&& dflt) const& { + BSONCXX_PRIVATE_CONSTEXPR_CXX14 value_type value_or(U&& dflt) const& { if (has_value()) { return **this; } else { - return static_cast(BSONCXX_FWD(dflt)); + return static_cast(BSONCXX_PRIVATE_FWD(dflt)); } } template - bsoncxx_cxx14_constexpr value_type value_or(U&& dflt) && { + BSONCXX_PRIVATE_CONSTEXPR_CXX14 value_type value_or(U&& dflt) && { if (has_value()) { return *std::move(*this); } else { - return static_cast(BSONCXX_FWD(dflt)); + return static_cast(BSONCXX_PRIVATE_FWD(dflt)); } } private: - bsoncxx_cxx14_constexpr void _assert_has_value(char const* msg) const noexcept { + BSONCXX_PRIVATE_CONSTEXPR_CXX14 void _assert_has_value(char const* msg) const noexcept { if (!this->has_value()) { detail::terminate_disengaged_optional(msg); } } - bsoncxx_cxx14_constexpr void _throw_if_empty() const { + BSONCXX_PRIVATE_CONSTEXPR_CXX14 void _throw_if_empty() const { if (!this->has_value()) { detail::throw_bad_optional(); } @@ -345,9 +346,9 @@ class optional : bsoncxx::detail::equality_operators, // // @param value The value being made into an optional. template -bsoncxx_cxx14_constexpr optional> make_optional(T&& value) noexcept( +BSONCXX_PRIVATE_CONSTEXPR_CXX14 optional> make_optional(T&& value) noexcept( std::is_nothrow_constructible, T&&>::value) { - return optional>(BSONCXX_FWD(value)); + return optional>(BSONCXX_PRIVATE_FWD(value)); } // Emplace-construct a new optional of the given type with the given constructor arguments. @@ -355,17 +356,17 @@ bsoncxx_cxx14_constexpr optional> make_optional(T&& // @tparam T The type to be constructed // @param args Constructor arguments template -bsoncxx_cxx14_constexpr optional make_optional(Args&&... args) noexcept( +BSONCXX_PRIVATE_CONSTEXPR_CXX14 optional make_optional(Args&&... args) noexcept( std::is_nothrow_constructible::value) { - return optional(in_place, BSONCXX_FWD(args)...); + return optional(in_place, BSONCXX_PRIVATE_FWD(args)...); } // Emplace-construct a new optional of the given type with the given arguments (accepts an init-list // as the first argument). template -bsoncxx_cxx14_constexpr optional make_optional(std::initializer_list il, Args&&... args) noexcept( +BSONCXX_PRIVATE_CONSTEXPR_CXX14 optional make_optional(std::initializer_list il, Args&&... args) noexcept( std::is_nothrow_constructible, Args&&...>::value) { - return optional(in_place, il, BSONCXX_FWD(args)...); + return optional(in_place, il, BSONCXX_PRIVATE_FWD(args)...); } namespace detail { @@ -457,11 +458,11 @@ struct optional_assign_base : optional_construct_base { // Disallow copies. - bsoncxx_cxx14_constexpr optional_assign_base& operator=(optional_assign_base const&) = delete; + BSONCXX_PRIVATE_CONSTEXPR_CXX14 optional_assign_base& operator=(optional_assign_base const&) = delete; // Allow move-assignment. - bsoncxx_cxx14_constexpr optional_assign_base& operator=(optional_assign_base&&) = default; + BSONCXX_PRIVATE_CONSTEXPR_CXX14 optional_assign_base& operator=(optional_assign_base&&) = default; }; template @@ -527,26 +528,26 @@ struct optional_destruct_helper { // Optional's ADL-only operators are defined here. struct optional_operators_base { template - friend bsoncxx_cxx14_constexpr auto + friend BSONCXX_PRIVATE_CONSTEXPR_CXX14 auto tag_invoke(bsoncxx::detail::equal_to, optional const& left, optional const& right) noexcept -> bsoncxx::detail::requires_t> { if (left.has_value() != right.has_value()) { return false; } - BSONCXX_PUSH_WARNINGS(); - BSONCXX_DISABLE_WARNING(GNU("-Wfloat-equal")); + BSONCXX_PRIVATE_WARNINGS_PUSH(); + BSONCXX_PRIVATE_WARNINGS_DISABLE(GNU("-Wfloat-equal")); return !left.has_value() || *left == *right; - BSONCXX_POP_WARNINGS(); + BSONCXX_PRIVATE_WARNINGS_POP(); } template friend constexpr auto tag_invoke(bsoncxx::detail::equal_to, optional const& left, U const& right) noexcept -> bsoncxx::detail::requires_t, bsoncxx::detail::is_equality_comparable> { - BSONCXX_PUSH_WARNINGS(); - BSONCXX_DISABLE_WARNING(GNU("-Wfloat-equal")); + BSONCXX_PRIVATE_WARNINGS_PUSH(); + BSONCXX_PRIVATE_WARNINGS_DISABLE(GNU("-Wfloat-equal")); return left.has_value() && *left == right; - BSONCXX_POP_WARNINGS(); + BSONCXX_PRIVATE_WARNINGS_POP(); } template @@ -555,7 +556,7 @@ struct optional_operators_base { } template - bsoncxx_cxx14_constexpr friend auto + BSONCXX_PRIVATE_CONSTEXPR_CXX14 friend auto tag_invoke(bsoncxx::detail::compare_three_way compare, optional const& left, optional const& right) -> bsoncxx::detail::requires_t< bsoncxx::detail::strong_ordering, @@ -579,7 +580,7 @@ struct optional_operators_base { } template - bsoncxx_cxx14_constexpr friend auto + BSONCXX_PRIVATE_CONSTEXPR_CXX14 friend auto tag_invoke(bsoncxx::detail::compare_three_way compare, optional const& left, U const& right) -> bsoncxx::detail::requires_t< bsoncxx::detail::strong_ordering, @@ -605,7 +606,7 @@ struct optional_swap_mixin {}; template struct optional_swap_mixin { - bsoncxx_cxx14_constexpr friend void swap(optional& left, optional& right) noexcept( + BSONCXX_PRIVATE_CONSTEXPR_CXX14 friend void swap(optional& left, optional& right) noexcept( std::is_nothrow_move_constructible::value && bsoncxx::detail::is_nothrow_swappable::value) { left.swap(right); } @@ -634,12 +635,12 @@ class optional_common_base : optional_operators_base, optional_swap_mixin { optional_common_base& operator=(optional_common_base const& other) noexcept( std::is_nothrow_copy_assignable::value) { - this->_assign(BSONCXX_FWD(other)); + this->_assign(BSONCXX_PRIVATE_FWD(other)); return *this; } optional_common_base& operator=(optional_common_base&& other) noexcept(std::is_nothrow_move_assignable::value) { - this->_assign(BSONCXX_FWD(other)); + this->_assign(BSONCXX_PRIVATE_FWD(other)); return *this; } @@ -656,7 +657,7 @@ class optional_common_base : optional_operators_base, optional_swap_mixin { template T& emplace(Args&&... args) { this->reset(); - this->_emplace_construct_anew(BSONCXX_FWD(args)...); + this->_emplace_construct_anew(BSONCXX_PRIVATE_FWD(args)...); return this->_storage.value; } @@ -665,12 +666,12 @@ class optional_common_base : optional_operators_base, optional_swap_mixin { template T& emplace(std::initializer_list il, Args&&... args) { this->reset(); - this->_emplace_construct_anew(il, BSONCXX_FWD(args)...); + this->_emplace_construct_anew(il, BSONCXX_PRIVATE_FWD(args)...); return this->_storage.value; } // Special swap for optional values that removes need for a temporary. - bsoncxx_cxx14_constexpr void swap(optional_common_base& other) noexcept( + BSONCXX_PRIVATE_CONSTEXPR_CXX14 void swap(optional_common_base& other) noexcept( std::is_nothrow_move_constructible::value && bsoncxx::detail::is_nothrow_swappable::value) { if (other._has_value) { if (this->_has_value) { @@ -699,7 +700,7 @@ class optional_common_base : optional_operators_base, optional_swap_mixin { // have a live value. template void _emplace_construct_anew(Args&&... args) noexcept(std::is_nothrow_constructible::value) { - new (std::addressof(this->_storage.value)) T(BSONCXX_FWD(args)...); + new (std::addressof(this->_storage.value)) T(BSONCXX_PRIVATE_FWD(args)...); this->_has_value = true; } @@ -710,10 +711,10 @@ class optional_common_base : optional_operators_base, optional_swap_mixin { // We are receiving a value. if (this->_has_value) { // We already have a value. Invoke the underlying assignment. - this->_storage.value = BSONCXX_FWD(other_storage)._storage.value; + this->_storage.value = BSONCXX_PRIVATE_FWD(other_storage)._storage.value; } else { // We don't have a value. Use the constructor. - this->_emplace_construct_anew(BSONCXX_FWD(other_storage)._storage.value); + this->_emplace_construct_anew(BSONCXX_PRIVATE_FWD(other_storage)._storage.value); } } else { // We are receiving nullopt. Destroy our value, if present. diff --git a/src/bsoncxx/include/bsoncxx/v1/stdx/string_view.hpp b/src/bsoncxx/include/bsoncxx/v1/stdx/string_view.hpp index e721cb4916..b5a92454d2 100644 --- a/src/bsoncxx/include/bsoncxx/v1/stdx/string_view.hpp +++ b/src/bsoncxx/include/bsoncxx/v1/stdx/string_view.hpp @@ -80,7 +80,7 @@ class basic_string_view : bsoncxx::detail::equality_operators, bsoncxx::detail:: constexpr basic_string_view() noexcept = default; constexpr basic_string_view(basic_string_view const&) noexcept = default; - bsoncxx_cxx14_constexpr basic_string_view& operator=(basic_string_view const&) noexcept = default; + BSONCXX_PRIVATE_CONSTEXPR_CXX14 basic_string_view& operator=(basic_string_view const&) noexcept = default; constexpr basic_string_view(const_pointer s, size_type count) : _begin(s), _size(count) {} @@ -130,7 +130,7 @@ class basic_string_view : bsoncxx::detail::equality_operators, bsoncxx::detail:: return _begin[offset]; } - bsoncxx_cxx14_constexpr const_reference at(size_type pos) const { + BSONCXX_PRIVATE_CONSTEXPR_CXX14 const_reference at(size_type pos) const { if (pos >= size()) { throw std::out_of_range{"bsoncxx::stdx::basic_string_view::at()"}; } @@ -165,16 +165,16 @@ class basic_string_view : bsoncxx::detail::equality_operators, bsoncxx::detail:: return static_cast(std::numeric_limits::max()); } - bsoncxx_cxx14_constexpr void remove_prefix(size_type n) { + BSONCXX_PRIVATE_CONSTEXPR_CXX14 void remove_prefix(size_type n) { _begin += n; _size -= n; } - bsoncxx_cxx14_constexpr void remove_suffix(size_type n) { + BSONCXX_PRIVATE_CONSTEXPR_CXX14 void remove_suffix(size_type n) { _size -= n; } - bsoncxx_cxx14_constexpr void swap(basic_string_view& other) { + BSONCXX_PRIVATE_CONSTEXPR_CXX14 void swap(basic_string_view& other) { std::swap(_begin, other._begin); std::swap(_size, other._size); } @@ -188,7 +188,7 @@ class basic_string_view : bsoncxx::detail::equality_operators, bsoncxx::detail:: return count; } - bsoncxx_cxx14_constexpr basic_string_view substr(size_type pos = 0, size_type count = npos) const { + BSONCXX_PRIVATE_CONSTEXPR_CXX14 basic_string_view substr(size_type pos = 0, size_type count = npos) const { if (pos > size()) { throw std::out_of_range{"bsoncxx::stdx::basic_string_view::substr()"}; } @@ -221,7 +221,7 @@ class basic_string_view : bsoncxx::detail::equality_operators, bsoncxx::detail:: return substr(pos1, count1).compare(basic_string_view(str, count2)); } - bsoncxx_cxx14_constexpr size_type find(basic_string_view infix, size_type pos = 0) const noexcept { + BSONCXX_PRIVATE_CONSTEXPR_CXX14 size_type find(basic_string_view infix, size_type pos = 0) const noexcept { if (pos > size()) { return npos; } @@ -237,7 +237,7 @@ class basic_string_view : bsoncxx::detail::equality_operators, bsoncxx::detail:: return static_cast(found - begin()); } - bsoncxx_cxx14_constexpr size_type rfind(basic_string_view infix, size_type pos = npos) const noexcept { + BSONCXX_PRIVATE_CONSTEXPR_CXX14 size_type rfind(basic_string_view infix, size_type pos = npos) const noexcept { // Calc the endpos where searching should begin, which includes the infix size. size_type const substr_size = pos != npos ? pos + infix.size() : pos; if (infix.empty()) { @@ -279,7 +279,7 @@ class basic_string_view : bsoncxx::detail::equality_operators, bsoncxx::detail:: constexpr size_type Name(const_pointer cstr, size_type pos = DefaultPos) const { \ return Name(basic_string_view(cstr), pos); \ } \ - BSONCXX_FORCE_SEMICOLON + BSONCXX_PRIVATE_FORCE_SEMICOLON DECL_FINDERS(find, 0); DECL_FINDERS(rfind, npos); @@ -328,7 +328,7 @@ class basic_string_view : bsoncxx::detail::equality_operators, bsoncxx::detail:: // Find the first in-bounds index I in [pos, size()) where the given predicate // returns true for substr(I). If no index exists, returns npos. template - bsoncxx_cxx14_constexpr size_type _find_if(size_type pos, F pred) const noexcept { + BSONCXX_PRIVATE_CONSTEXPR_CXX14 size_type _find_if(size_type pos, F pred) const noexcept { auto const sub = substr(pos); iterator const found = std::find_if(sub.begin(), sub.end(), pred); if (found == end()) { @@ -340,7 +340,7 @@ class basic_string_view : bsoncxx::detail::equality_operators, bsoncxx::detail:: // Find the LAST index I in [0, pos] where the given predicate returns true for // substr(0, I). If no such index exists, returns npos. template - bsoncxx_cxx14_constexpr size_type _rfind_if(size_type pos, F pred) const noexcept { + BSONCXX_PRIVATE_CONSTEXPR_CXX14 size_type _rfind_if(size_type pos, F pred) const noexcept { // Adjust 'pos' for an inclusive range in substr() auto const rpos = pos == npos ? npos : pos + 1; // The substring that will be searched: diff --git a/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/document/value.hpp b/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/document/value.hpp index 2e229e7e36..4b9d9798a1 100644 --- a/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/document/value.hpp +++ b/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/document/value.hpp @@ -181,10 +181,10 @@ class value { /// document::view view() const noexcept { // Silence false positive with g++ 10.2.1 on Debian 11. - BSONCXX_PUSH_WARNINGS(); - BSONCXX_DISABLE_WARNING(GCC("-Wmaybe-uninitialized")); + BSONCXX_PRIVATE_WARNINGS_PUSH(); + BSONCXX_PRIVATE_WARNINGS_DISABLE(GCC("-Wmaybe-uninitialized")); return document::view{static_cast(_data.get()), _length}; - BSONCXX_POP_WARNINGS(); + BSONCXX_PRIVATE_WARNINGS_POP(); } /// diff --git a/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/exception/exception.hpp b/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/exception/exception.hpp index 9df2352bfb..01dcda80d9 100644 --- a/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/exception/exception.hpp +++ b/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/exception/exception.hpp @@ -23,9 +23,9 @@ namespace bsoncxx { namespace v_noabi { -BSONCXX_PUSH_WARNINGS(); -BSONCXX_DISABLE_WARNING(MSVC(4251)); -BSONCXX_DISABLE_WARNING(MSVC(4275)); +BSONCXX_PRIVATE_WARNINGS_PUSH(); +BSONCXX_PRIVATE_WARNINGS_DISABLE(MSVC(4251)); +BSONCXX_PRIVATE_WARNINGS_DISABLE(MSVC(4275)); /// /// Base class for all exceptions thrown by the bsoncxx library unless otherwise specified. @@ -42,7 +42,7 @@ class exception : public std::system_error { using std::system_error::system_error; }; -BSONCXX_POP_WARNINGS(); +BSONCXX_PRIVATE_WARNINGS_POP(); } // namespace v_noabi } // namespace bsoncxx diff --git a/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/types.hpp b/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/types.hpp index 9f842ddf14..b5aeb37d68 100644 --- a/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/types.hpp +++ b/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/types.hpp @@ -29,8 +29,8 @@ #include -BSONCXX_PUSH_WARNINGS(); -BSONCXX_DISABLE_WARNING(GNU("-Wfloat-equal")); +BSONCXX_PRIVATE_WARNINGS_PUSH(); +BSONCXX_PRIVATE_WARNINGS_DISABLE(GNU("-Wfloat-equal")); namespace bsoncxx { namespace v_noabi { @@ -849,7 +849,7 @@ inline bool operator!=(b_maxkey const& lhs, b_maxkey const& rhs) { } // namespace v_noabi } // namespace bsoncxx -BSONCXX_POP_WARNINGS(); +BSONCXX_PRIVATE_WARNINGS_POP(); namespace bsoncxx { 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 680818f8a7..bc497e2919 100644 --- a/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/document/element.cpp +++ b/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/document/element.cpp @@ -107,7 +107,7 @@ types::bson_value::view element::get_value() const { #undef BSONCXX_ENUM } - BSONCXX_UNREACHABLE; + BSONCXX_PRIVATE_UNREACHABLE; } types::bson_value::value element::get_owning_value() const { diff --git a/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/json.cpp b/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/json.cpp index 2a0b64d52f..8393de1bac 100644 --- a/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/json.cpp +++ b/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/json.cpp @@ -70,7 +70,7 @@ std::string to_json(document::view view, ExtendedJsonMode mode) { return to_json_helper(view, bson_as_canonical_extended_json); } - BSONCXX_UNREACHABLE; + BSONCXX_PRIVATE_UNREACHABLE; } std::string to_json(array::view view, ExtendedJsonMode mode) { @@ -85,7 +85,7 @@ std::string to_json(array::view view, ExtendedJsonMode mode) { return to_json_helper(view, bson_array_as_canonical_extended_json); } - BSONCXX_UNREACHABLE; + BSONCXX_PRIVATE_UNREACHABLE; } document::value from_json(stdx::string_view json) { 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 dba7cd6a57..27ae875239 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 @@ -135,7 +135,7 @@ void view::_init(void* internal_value) noexcept { #include #undef BSONCXX_ENUM default: - BSONCXX_UNREACHABLE; + BSONCXX_PRIVATE_UNREACHABLE; } } @@ -153,7 +153,7 @@ bool operator==(view const& lhs, view const& rhs) { } // Silence compiler warnings about failing to return a value. - BSONCXX_UNREACHABLE; + BSONCXX_PRIVATE_UNREACHABLE; } bool operator!=(view const& lhs, view const& rhs) { diff --git a/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/types/private/convert.hh b/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/types/private/convert.hh index d57cf44652..8d8b38a96a 100644 --- a/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/types/private/convert.hh +++ b/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/types/private/convert.hh @@ -194,7 +194,7 @@ inline void convert_to_libbson(bson_value_t* v, bson_value::view const& bson_vie #include #undef BSONCXX_ENUM default: - BSONCXX_UNREACHABLE; + BSONCXX_PRIVATE_UNREACHABLE; } } diff --git a/src/bsoncxx/test/CMakeLists.txt b/src/bsoncxx/test/CMakeLists.txt index a4798fbb51..b2ddd04ffa 100644 --- a/src/bsoncxx/test/CMakeLists.txt +++ b/src/bsoncxx/test/CMakeLists.txt @@ -104,28 +104,28 @@ if(ENABLE_MACRO_GUARD_TESTS) BSONCXX_VERSION_PATCH # bsoncxx/v1/detail/macros.hpp - BSONCXX_CONCAT - BSONCXX_CONCAT_IMPL - BSONCXX_DISABLE_WARNING - BSONCXX_FORCE_SEMICOLON - BSONCXX_FWD - BSONCXX_IF_CLANG - BSONCXX_IF_GCC - BSONCXX_IF_GNU_LIKE - BSONCXX_IF_MSVC - BSONCXX_POP_WARNINGS - BSONCXX_PRAGMA - BSONCXX_PUSH_WARNINGS - BSONCXX_RETURNS - BSONCXX_STRINGIFY - BSONCXX_STRINGIFY_IMPL - BSONCXX_UNREACHABLE - _bsoncxxDisableWarningImpl_for_Clang - _bsoncxxDisableWarningImpl_for_GCC - _bsoncxxDisableWarningImpl_for_GNU - _bsoncxxDisableWarningImpl_for_MSVC - _bsoncxxPragma - bsoncxx_cxx14_constexpr + BSONCXX_PRIVATE_CONCAT + BSONCXX_PRIVATE_CONCAT_IMPL + BSONCXX_PRIVATE_CONSTEXPR_CXX14 + BSONCXX_PRIVATE_FORCE_SEMICOLON + BSONCXX_PRIVATE_FWD + BSONCXX_PRIVATE_IF_CLANG + BSONCXX_PRIVATE_IF_GCC + BSONCXX_PRIVATE_IF_GNU_LIKE + BSONCXX_PRIVATE_IF_MSVC + BSONCXX_PRIVATE_PRAGMA + BSONCXX_PRIVATE_PRAGMA_IMPL + BSONCXX_PRIVATE_RETURNS + BSONCXX_PRIVATE_STRINGIFY + BSONCXX_PRIVATE_STRINGIFY_IMPL + BSONCXX_PRIVATE_UNREACHABLE + BSONCXX_PRIVATE_WARNINGS_DISABLE + BSONCXX_PRIVATE_WARNINGS_DISABLE_IMPL_FOR_Clang + BSONCXX_PRIVATE_WARNINGS_DISABLE_IMPL_FOR_GCC + BSONCXX_PRIVATE_WARNINGS_DISABLE_IMPL_FOR_GNU + BSONCXX_PRIVATE_WARNINGS_DISABLE_IMPL_FOR_MSVC + BSONCXX_PRIVATE_WARNINGS_POP + BSONCXX_PRIVATE_WARNINGS_PUSH # bsoncxx/v1/detail/prelude.hpp BSONCXX_PRIVATE_V1_INSIDE_MACRO_GUARD_SCOPE diff --git a/src/bsoncxx/test/catch.hh b/src/bsoncxx/test/catch.hh index 9fbb3c716a..aef7695024 100644 --- a/src/bsoncxx/test/catch.hh +++ b/src/bsoncxx/test/catch.hh @@ -27,25 +27,25 @@ #include // TEST_CASE, SECTION, CHECK, etc. #include // Catch::StringMaker -#define THROWS_WITH_CODE_IMPL(_assertion, _expr, _code) \ - if (1) { \ - try { \ - (void)(_expr); \ - INFO("expected an exception to be thrown: " #_expr); \ - _assertion(false); \ - } catch (Catch::TestFailureException const&) { \ - throw; /* Propagate Catch exceptions. */ \ - } catch (Catch::TestSkipException const&) { \ - throw; /* Propagate Catch exceptions. */ \ - } catch (std::system_error const& ex) { \ - using std::make_error_code; \ - (void)ex; /* Avoid unused variable warnings. */ \ - _assertion(ex.code() == (_code)); \ - } catch (...) { \ - /* Reuse `*_THROWS_AS` to handle the unexpected exception type. */ \ - BSONCXX_CONCAT(_assertion, _THROWS_AS)(throw, std::system_error); \ - } \ - } else \ +#define THROWS_WITH_CODE_IMPL(_assertion, _expr, _code) \ + if (1) { \ + try { \ + (void)(_expr); \ + INFO("expected an exception to be thrown: " #_expr); \ + _assertion(false); \ + } catch (Catch::TestFailureException const&) { \ + throw; /* Propagate Catch exceptions. */ \ + } catch (Catch::TestSkipException const&) { \ + throw; /* Propagate Catch exceptions. */ \ + } catch (std::system_error const& ex) { \ + using std::make_error_code; \ + (void)ex; /* Avoid unused variable warnings. */ \ + _assertion(ex.code() == (_code)); \ + } catch (...) { \ + /* Reuse `*_THROWS_AS` to handle the unexpected exception type. */ \ + BSONCXX_PRIVATE_CONCAT(_assertion, _THROWS_AS)(throw, std::system_error); \ + } \ + } else \ ((void)0) #define CHECK_THROWS_WITH_CODE(_expr, _code) THROWS_WITH_CODE_IMPL(CHECK, _expr, _code) diff --git a/src/bsoncxx/test/optional.test.cpp b/src/bsoncxx/test/optional.test.cpp index 9a585b30ef..627b316a25 100644 --- a/src/bsoncxx/test/optional.test.cpp +++ b/src/bsoncxx/test/optional.test.cpp @@ -80,10 +80,10 @@ template struct is_hashable : std::false_type {}; #endif -BSONCXX_PUSH_WARNINGS(); -BSONCXX_DISABLE_WARNING(GNU("-Wunused")); -BSONCXX_DISABLE_WARNING(Clang("-Wunused-member-function")); -BSONCXX_DISABLE_WARNING(Clang("-Wunneeded-member-function")); +BSONCXX_PRIVATE_WARNINGS_PUSH(); +BSONCXX_PRIVATE_WARNINGS_DISABLE(GNU("-Wunused")); +BSONCXX_PRIVATE_WARNINGS_DISABLE(Clang("-Wunused-member-function")); +BSONCXX_PRIVATE_WARNINGS_DISABLE(Clang("-Wunneeded-member-function")); struct not_default_constructible { explicit not_default_constructible(int); @@ -110,16 +110,16 @@ struct not_copyable { not_copyable& operator=(not_copyable&&) = default; }; -BSONCXX_POP_WARNINGS(); +BSONCXX_PRIVATE_WARNINGS_POP(); // Improve quality of error messages on failure (in particular for MSVC). #define STATIC_ASSERT_EXPR(expr) static_assert((expr), "expected: " #expr) #define STATIC_ASSERT_EXPR_EQUAL(a, b) static_assert((a) == (b), "expected: " #a " == " #b) -BSONCXX_PUSH_WARNINGS(); -BSONCXX_DISABLE_WARNING(GNU("-Wunused-macros")); +BSONCXX_PRIVATE_WARNINGS_PUSH(); +BSONCXX_PRIVATE_WARNINGS_DISABLE(GNU("-Wunused-macros")); #define STATIC_ASSERT_EXPR_IMPLIES(a, b) static_assert((!(a) || (b)), "expected: " #a " -> " #b) -BSONCXX_POP_WARNINGS(); +BSONCXX_PRIVATE_WARNINGS_POP(); #if defined(BSONCXX_POLY_USE_STD) // Deliberately weaken assertions for stdlib implementations to accomodate for differences in diff --git a/src/bsoncxx/test/type_traits.test.cpp b/src/bsoncxx/test/type_traits.test.cpp index b79c94f5a0..dae83f62ec 100644 --- a/src/bsoncxx/test/type_traits.test.cpp +++ b/src/bsoncxx/test/type_traits.test.cpp @@ -8,9 +8,9 @@ #include // We declare variables that are only used for compilation checking -BSONCXX_DISABLE_WARNING(GNU("-Wunused")); -BSONCXX_DISABLE_WARNING(Clang("-Wunused-template")); -BSONCXX_DISABLE_WARNING(Clang("-Wunneeded-member-function")); +BSONCXX_PRIVATE_WARNINGS_DISABLE(GNU("-Wunused")); +BSONCXX_PRIVATE_WARNINGS_DISABLE(Clang("-Wunused-template")); +BSONCXX_PRIVATE_WARNINGS_DISABLE(Clang("-Wunneeded-member-function")); namespace { diff --git a/src/mongocxx/include/mongocxx/v1/detail/macros.hpp b/src/mongocxx/include/mongocxx/v1/detail/macros.hpp index d78a74b8f6..1e50fa51e0 100644 --- a/src/mongocxx/include/mongocxx/v1/detail/macros.hpp +++ b/src/mongocxx/include/mongocxx/v1/detail/macros.hpp @@ -16,7 +16,7 @@ #if !defined(MONGOCXX_V1_DETAIL_MACROS_HPP) #define MONGOCXX_V1_DETAIL_MACROS_HPP -#define MONGOCXX_UNREACHABLE std::abort() +#define MONGOCXX_PRIVATE_UNREACHABLE std::abort() #endif // !defined(MONGOCXX_V1_DETAIL_MACROS_HPP) diff --git a/src/mongocxx/include/mongocxx/v1/detail/postlude.hpp b/src/mongocxx/include/mongocxx/v1/detail/postlude.hpp index d9c67ae541..2594bb7eb8 100644 --- a/src/mongocxx/include/mongocxx/v1/detail/postlude.hpp +++ b/src/mongocxx/include/mongocxx/v1/detail/postlude.hpp @@ -35,7 +35,7 @@ // mongocxx/v1/detail/macros.hpp #pragma push_macro("MONGOCXX_V1_DETAIL_MACROS_HPP") #if !defined(MONGOCXX_V1_DETAIL_MACROS_HPP) -#pragma pop_macro("MONGOCXX_UNREACHABLE") +#pragma pop_macro("MONGOCXX_PRIVATE_UNREACHABLE") #endif #if !defined(MONGOCXX_PRIVATE_V1_INSIDE_MACRO_GUARD_SCOPE) diff --git a/src/mongocxx/include/mongocxx/v1/detail/prelude.hpp b/src/mongocxx/include/mongocxx/v1/detail/prelude.hpp index 9dfafd847e..3ff8c8636c 100644 --- a/src/mongocxx/include/mongocxx/v1/detail/prelude.hpp +++ b/src/mongocxx/include/mongocxx/v1/detail/prelude.hpp @@ -49,8 +49,8 @@ // mongocxx/v1/detail/macros.hpp #pragma push_macro("MONGOCXX_V1_DETAIL_MACROS_HPP") #if !defined(MONGOCXX_V1_DETAIL_MACROS_HPP) -#pragma push_macro("MONGOCXX_UNREACHABLE") -#undef MONGOCXX_UNREACHABLE +#pragma push_macro("MONGOCXX_PRIVATE_UNREACHABLE") +#undef MONGOCXX_PRIVATE_UNREACHABLE #endif /// diff --git a/src/mongocxx/include/mongocxx/v_noabi/mongocxx/exception/exception.hpp b/src/mongocxx/include/mongocxx/v_noabi/mongocxx/exception/exception.hpp index f5378db157..eee4eb6d1c 100644 --- a/src/mongocxx/include/mongocxx/v_noabi/mongocxx/exception/exception.hpp +++ b/src/mongocxx/include/mongocxx/v_noabi/mongocxx/exception/exception.hpp @@ -26,9 +26,9 @@ namespace mongocxx { namespace v_noabi { -BSONCXX_PUSH_WARNINGS(); -BSONCXX_DISABLE_WARNING(MSVC(4251)); -BSONCXX_DISABLE_WARNING(MSVC(4275)); +BSONCXX_PRIVATE_WARNINGS_PUSH(); +BSONCXX_PRIVATE_WARNINGS_DISABLE(MSVC(4251)); +BSONCXX_PRIVATE_WARNINGS_DISABLE(MSVC(4275)); /// /// Base class for all exceptions thrown by the mongocxx library unless otherwise specified. @@ -45,7 +45,7 @@ class exception : public std::system_error { using system_error::system_error; }; -BSONCXX_POP_WARNINGS(); +BSONCXX_PRIVATE_WARNINGS_POP(); } // namespace v_noabi } // namespace mongocxx diff --git a/src/mongocxx/include/mongocxx/v_noabi/mongocxx/exception/operation_exception.hpp b/src/mongocxx/include/mongocxx/v_noabi/mongocxx/exception/operation_exception.hpp index 44f8762c3f..8173053465 100644 --- a/src/mongocxx/include/mongocxx/v_noabi/mongocxx/exception/operation_exception.hpp +++ b/src/mongocxx/include/mongocxx/v_noabi/mongocxx/exception/operation_exception.hpp @@ -30,9 +30,9 @@ namespace mongocxx { namespace v_noabi { -BSONCXX_PUSH_WARNINGS(); -BSONCXX_DISABLE_WARNING(MSVC(4251)); -BSONCXX_DISABLE_WARNING(MSVC(4275)); +BSONCXX_PRIVATE_WARNINGS_PUSH(); +BSONCXX_PRIVATE_WARNINGS_DISABLE(MSVC(4251)); +BSONCXX_PRIVATE_WARNINGS_DISABLE(MSVC(4275)); /// /// An exception thrown during a MongoDB server operation. @@ -91,7 +91,7 @@ class operation_exception : public exception { bsoncxx::v_noabi::stdx::optional _raw_server_error; }; -BSONCXX_POP_WARNINGS(); +BSONCXX_PRIVATE_WARNINGS_POP(); } // namespace v_noabi } // namespace mongocxx diff --git a/src/mongocxx/include/mongocxx/v_noabi/mongocxx/options/index.hpp b/src/mongocxx/include/mongocxx/v_noabi/mongocxx/options/index.hpp index ad93b73c22..7e46074756 100644 --- a/src/mongocxx/include/mongocxx/v_noabi/mongocxx/options/index.hpp +++ b/src/mongocxx/include/mongocxx/v_noabi/mongocxx/options/index.hpp @@ -42,9 +42,9 @@ namespace options { /// class index { public: - BSONCXX_PUSH_WARNINGS(); - BSONCXX_DISABLE_WARNING(MSVC(4251)); - BSONCXX_DISABLE_WARNING(MSVC(4275)); + BSONCXX_PRIVATE_WARNINGS_PUSH(); + BSONCXX_PRIVATE_WARNINGS_DISABLE(MSVC(4251)); + BSONCXX_PRIVATE_WARNINGS_DISABLE(MSVC(4275)); /// /// Base class representing the optional storage engine options for indexes. @@ -103,7 +103,7 @@ class index { bsoncxx::v_noabi::stdx::optional _config_string; }; - BSONCXX_POP_WARNINGS(); + BSONCXX_PRIVATE_WARNINGS_POP(); MONGOCXX_ABI_EXPORT_CDECL() index(); 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 6a9a916a98..a59a44f9f0 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/gridfs/bucket.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/gridfs/bucket.cpp @@ -271,7 +271,7 @@ void bucket::_upload_from_stream_with_id( if (source->bad() || (source->fail() && !source->eof())) { upload_stream.abort(); source->exceptions(std::ios::failbit | std::ios::badbit); - MONGOCXX_UNREACHABLE; + MONGOCXX_PRIVATE_UNREACHABLE; } upload_stream.close(); diff --git a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/instance.cpp b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/instance.cpp index 110aaac559..233a11699a 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/instance.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/instance.cpp @@ -55,7 +55,7 @@ log_level convert_log_level(::mongoc_log_level_t mongoc_log_level) { case MONGOC_LOG_LEVEL_TRACE: return log_level::k_trace; default: - MONGOCXX_UNREACHABLE; + MONGOCXX_PRIVATE_UNREACHABLE; } } diff --git a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/client_session.hh b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/client_session.hh index f0bab3edd9..b3e2803aa8 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/client_session.hh +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/client_session.hh @@ -205,7 +205,7 @@ class client_session::impl { case MONGOC_TRANSACTION_ABORTED: return transaction_state::k_transaction_aborted; default: - MONGOCXX_UNREACHABLE; + MONGOCXX_PRIVATE_UNREACHABLE; } } diff --git a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/conversions.cpp b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/conversions.cpp index e11b1ee717..5090b6311d 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/conversions.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/conversions.cpp @@ -36,7 +36,7 @@ mongoc_read_mode_t read_mode_t_from_read_mode(read_preference::read_mode read_mo return MONGOC_READ_NEAREST; } - MONGOCXX_UNREACHABLE; + MONGOCXX_PRIVATE_UNREACHABLE; } read_preference::read_mode read_mode_from_read_mode_t(mongoc_read_mode_t read_mode) { @@ -53,7 +53,7 @@ read_preference::read_mode read_mode_from_read_mode_t(mongoc_read_mode_t read_mo return read_preference::read_mode::k_nearest; } - MONGOCXX_UNREACHABLE; + MONGOCXX_PRIVATE_UNREACHABLE; } } // namespace conversions 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 8b6f6ec59e..040f88ec49 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/validation_criteria.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/validation_criteria.cpp @@ -37,7 +37,7 @@ std::string validation_level_to_string(mongocxx::v_noabi::validation_criteria::v return "strict"; } - MONGOCXX_UNREACHABLE; + MONGOCXX_PRIVATE_UNREACHABLE; } // Convert validation actions to strings. @@ -49,7 +49,7 @@ std::string validation_action_to_string(mongocxx::v_noabi::validation_criteria:: return "error"; } - MONGOCXX_UNREACHABLE; + MONGOCXX_PRIVATE_UNREACHABLE; } } // namespace 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 d976698c12..c03b7f5018 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/write_concern.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/write_concern.cpp @@ -129,7 +129,7 @@ write_concern::level write_concern::acknowledge_level() const { case MONGOC_WRITE_CONCERN_W_TAG: return write_concern::level::k_tag; default: - MONGOCXX_UNREACHABLE; + MONGOCXX_PRIVATE_UNREACHABLE; } } diff --git a/src/mongocxx/test/CMakeLists.txt b/src/mongocxx/test/CMakeLists.txt index 5f868d59c6..fffb820b78 100644 --- a/src/mongocxx/test/CMakeLists.txt +++ b/src/mongocxx/test/CMakeLists.txt @@ -307,7 +307,7 @@ if(ENABLE_MACRO_GUARD_TESTS) MONGOCXX_VERSION_PATCH # mongocxx/v1/detail/macros.hpp - MONGOCXX_UNREACHABLE + MONGOCXX_PRIVATE_UNREACHABLE # mongocxx/v1/detail/prelude.hpp MONGOCXX_PRIVATE_V1_INSIDE_MACRO_GUARD_SCOPE diff --git a/src/mongocxx/test/client_helpers.cpp b/src/mongocxx/test/client_helpers.cpp index f584f41fb1..a61ae47e6d 100644 --- a/src/mongocxx/test/client_helpers.cpp +++ b/src/mongocxx/test/client_helpers.cpp @@ -381,8 +381,8 @@ bool matches(types::bson_value::view main, types::bson_value::view pattern, matc return t == main.type(); } - BSONCXX_PUSH_WARNINGS(); - BSONCXX_DISABLE_WARNING(GNU("-Wfloat-equal")); + BSONCXX_PRIVATE_WARNINGS_PUSH(); + BSONCXX_PRIVATE_WARNINGS_DISABLE(GNU("-Wfloat-equal")); if (is_numeric(pattern) && as_double(pattern) == 42.0) { return true; @@ -393,7 +393,7 @@ bool matches(types::bson_value::view main, types::bson_value::view pattern, matc return true; } - BSONCXX_POP_WARNINGS(); + BSONCXX_PRIVATE_WARNINGS_POP(); if (main.type() == type::k_document) { // the value '42' acts as placeholders for "any value" diff --git a/src/mongocxx/test/client_side_encryption.cpp b/src/mongocxx/test/client_side_encryption.cpp index 1c00938cb6..2547e15a74 100644 --- a/src/mongocxx/test/client_side_encryption.cpp +++ b/src/mongocxx/test/client_side_encryption.cpp @@ -2810,7 +2810,7 @@ std::string to_type_str(RangeFieldType field_type) { } FAIL("unexpected field type " << static_cast(field_type)); - MONGOCXX_UNREACHABLE; + MONGOCXX_PRIVATE_UNREACHABLE; } bsoncxx::types::bson_value::value to_field_value(int test_value, RangeFieldType field_type) { @@ -2830,7 +2830,7 @@ bsoncxx::types::bson_value::value to_field_value(int test_value, RangeFieldType } FAIL("unexpected field type " << static_cast(field_type)); - MONGOCXX_UNREACHABLE; + MONGOCXX_PRIVATE_UNREACHABLE; } options::range to_range_opts(RangeFieldType field_type) { @@ -2876,7 +2876,7 @@ options::range to_range_opts(RangeFieldType field_type) { } FAIL("unexpected field type " << static_cast(field_type)); - MONGOCXX_UNREACHABLE; + MONGOCXX_PRIVATE_UNREACHABLE; } struct field_type_values { diff --git a/src/mongocxx/test/spec/unified_tests/assert.cpp b/src/mongocxx/test/spec/unified_tests/assert.cpp index b0f470c060..ea95447962 100644 --- a/src/mongocxx/test/spec/unified_tests/assert.cpp +++ b/src/mongocxx/test/spec/unified_tests/assert.cpp @@ -262,11 +262,11 @@ void assert::matches( to_string(expected), match_doc_current_path()); - BSONCXX_PUSH_WARNINGS(); - BSONCXX_DISABLE_WARNING(GNU("-Wfloat-equal")); + BSONCXX_PRIVATE_WARNINGS_PUSH(); + BSONCXX_PRIVATE_WARNINGS_DISABLE(GNU("-Wfloat-equal")); REQUIRE(test_util::is_numeric(actual)); REQUIRE(test_util::as_double(expected) == test_util::as_double(actual)); - BSONCXX_POP_WARNINGS(); + BSONCXX_PRIVATE_WARNINGS_POP(); return; } From 629d26259be712c2f473d4df748987d2e6da9b79 Mon Sep 17 00:00:00 2001 From: Ezra Chung Date: Fri, 10 Jan 2025 15:12:11 -0600 Subject: [PATCH 14/19] Move comparison-related type traits into type_traits.hpp --- .../include/bsoncxx/v1/detail/compare.hpp | 44 ------------------- .../include/bsoncxx/v1/detail/type_traits.hpp | 44 +++++++++++++++++++ 2 files changed, 44 insertions(+), 44 deletions(-) diff --git a/src/bsoncxx/include/bsoncxx/v1/detail/compare.hpp b/src/bsoncxx/include/bsoncxx/v1/detail/compare.hpp index 1189c20c74..e38ee65b79 100644 --- a/src/bsoncxx/include/bsoncxx/v1/detail/compare.hpp +++ b/src/bsoncxx/include/bsoncxx/v1/detail/compare.hpp @@ -26,23 +26,6 @@ namespace bsoncxx { namespace detail { -template -auto is_equality_comparable_f(...) -> std::false_type; - -BSONCXX_PRIVATE_WARNINGS_PUSH(); -BSONCXX_PRIVATE_WARNINGS_DISABLE(GNU("-Wfloat-equal")); -template -auto is_equality_comparable_f(int, bool b = false) - -> true_t< - decltype((std::declval() == std::declval()) ? 0 : 0, (std::declval() == std::declval()) ? 0 : 0, (std::declval() != std::declval()) ? 0 : 0, (std::declval() != std::declval()) ? 0 : 0)>; -BSONCXX_PRIVATE_WARNINGS_POP(); - -// Detect whether two types are equality-comparable. -// -// Requires L == R, L != R, R == L, and R != L. -template -struct is_equality_comparable : decltype(is_equality_comparable_f(0)) {}; - // Callable object and tag type for equality comparison. struct equal_to { template @@ -180,33 +163,6 @@ struct ordering_operators { #pragma pop_macro("DEFOP") }; -template -std::false_type is_partially_ordered_with_f(rank<0>); - -template -auto is_partially_ordered_with_f(rank<1>) -> true_t< - decltype(std::declval() > std::declval()), - decltype(std::declval() < std::declval()), - decltype(std::declval() >= std::declval()), - decltype(std::declval() <= std::declval()), - decltype(std::declval() < std::declval()), - decltype(std::declval() > std::declval()), - decltype(std::declval() <= std::declval()), - decltype(std::declval() >= std::declval())>; - -template -struct is_partially_ordered_with : decltype(is_partially_ordered_with_f(rank<1>{})) {}; - -template -struct is_totally_ordered : conjunction, is_partially_ordered_with> {}; - -template -struct is_totally_ordered_with : conjunction< - is_totally_ordered, - is_totally_ordered, - is_equality_comparable, - is_partially_ordered_with> {}; - } // namespace detail } // namespace bsoncxx diff --git a/src/bsoncxx/include/bsoncxx/v1/detail/type_traits.hpp b/src/bsoncxx/include/bsoncxx/v1/detail/type_traits.hpp index 701b828271..2113af18c6 100644 --- a/src/bsoncxx/include/bsoncxx/v1/detail/type_traits.hpp +++ b/src/bsoncxx/include/bsoncxx/v1/detail/type_traits.hpp @@ -462,6 +462,50 @@ struct is_swappable : is_swappable_with {}; template struct is_nothrow_swappable : is_nothrow_swappable_with {}; +template +auto is_equality_comparable_f(...) -> std::false_type; + +BSONCXX_PRIVATE_WARNINGS_PUSH(); +BSONCXX_PRIVATE_WARNINGS_DISABLE(GNU("-Wfloat-equal")); +template +auto is_equality_comparable_f(int, bool b = false) + -> true_t< + decltype((std::declval() == std::declval()) ? 0 : 0, (std::declval() == std::declval()) ? 0 : 0, (std::declval() != std::declval()) ? 0 : 0, (std::declval() != std::declval()) ? 0 : 0)>; +BSONCXX_PRIVATE_WARNINGS_POP(); + +// Detect whether two types are equality-comparable. +// +// Requires L == R, L != R, R == L, and R != L. +template +struct is_equality_comparable : decltype(is_equality_comparable_f(0)) {}; + +template +std::false_type is_partially_ordered_with_f(rank<0>); + +template +auto is_partially_ordered_with_f(rank<1>) -> true_t< + decltype(std::declval() > std::declval()), + decltype(std::declval() < std::declval()), + decltype(std::declval() >= std::declval()), + decltype(std::declval() <= std::declval()), + decltype(std::declval() < std::declval()), + decltype(std::declval() > std::declval()), + decltype(std::declval() <= std::declval()), + decltype(std::declval() >= std::declval())>; + +template +struct is_partially_ordered_with : decltype(is_partially_ordered_with_f(rank<1>{})) {}; + +template +struct is_totally_ordered : conjunction, is_partially_ordered_with> {}; + +template +struct is_totally_ordered_with : conjunction< + is_totally_ordered, + is_totally_ordered, + is_equality_comparable, + is_partially_ordered_with> {}; + } // namespace detail } // namespace bsoncxx From 9096a3099796b908a398d71a5086b331bda11418 Mon Sep 17 00:00:00 2001 From: Ezra Chung Date: Fri, 10 Jan 2025 15:12:11 -0600 Subject: [PATCH 15/19] Relocate internal components out of v_noabi subdirectories --- .clang-format | 4 +- src/bsoncxx/lib/CMakeLists.txt | 33 ++++---- .../{v_noabi/bsoncxx => }/private/b64_ntop.hh | 0 .../private => private/config}/config.hh.in | 0 .../private => private/config}/postlude.hh | 0 .../private => private/config}/prelude.hh | 2 +- .../{v_noabi/bsoncxx => }/private/helpers.hh | 4 +- .../{v_noabi/bsoncxx => }/private/itoa.cpp | 2 +- .../{v_noabi/bsoncxx => }/private/itoa.hh | 4 +- .../{v_noabi/bsoncxx => }/private/libbson.hh | 0 .../bsoncxx => }/private/make_unique.hh | 0 .../{v_noabi/bsoncxx => }/private/stack.hh | 4 +- .../private/suppress_deprecation_warnings.hh | 0 .../test_util/export_for_testing.hh | 4 +- .../bsoncxx/v_noabi/bsoncxx/array/element.cpp | 2 +- .../bsoncxx/v_noabi/bsoncxx/array/value.cpp | 2 +- .../bsoncxx/v_noabi/bsoncxx/array/view.cpp | 2 +- .../bsoncxx/v_noabi/bsoncxx/builder/core.cpp | 2 +- .../bsoncxx/v_noabi/bsoncxx/decimal128.cpp | 2 +- .../v_noabi/bsoncxx/document/element.cpp | 2 +- .../v_noabi/bsoncxx/document/value.cpp | 2 +- .../bsoncxx/v_noabi/bsoncxx/document/view.cpp | 2 +- .../v_noabi/bsoncxx/exception/error_code.cpp | 2 +- .../lib/bsoncxx/v_noabi/bsoncxx/json.cpp | 2 +- .../lib/bsoncxx/v_noabi/bsoncxx/oid.cpp | 2 +- .../v_noabi/bsoncxx/string/view_or_value.cpp | 2 +- .../lib/bsoncxx/v_noabi/bsoncxx/types.cpp | 2 +- .../bsoncxx/types/bson_value/private/value.hh | 4 +- .../bsoncxx/types/bson_value/value.cpp | 2 +- .../v_noabi/bsoncxx/types/bson_value/view.cpp | 2 +- .../v_noabi/bsoncxx/types/private/convert.hh | 4 +- .../lib/bsoncxx/v_noabi/bsoncxx/validate.cpp | 2 +- src/bsoncxx/test/catch.hh | 4 +- src/bsoncxx/test/exception_guard.hh | 4 +- src/bsoncxx/test/to_string.hh | 4 +- src/mongocxx/lib/CMakeLists.txt | 75 ++++++++++--------- .../private/append_aggregate_options.hh | 4 +- .../mongocxx => }/private/bulk_write.hh | 4 +- .../mongocxx => }/private/change_stream.hh | 4 +- .../{v_noabi/mongocxx => }/private/client.hh | 4 +- .../private/client_encryption.hh | 4 +- .../mongocxx => }/private/client_session.hh | 4 +- .../mongocxx => }/private/collection.hh | 4 +- .../private => private/config}/config.hh.in | 0 .../private => private/config}/postlude.hh | 0 .../private => private/config}/prelude.hh | 2 +- .../mongocxx => }/private/conversions.cpp | 2 +- .../mongocxx => }/private/conversions.hh | 4 +- .../{v_noabi/mongocxx => }/private/cursor.hh | 4 +- .../mongocxx => }/private/database.hh | 4 +- .../mongocxx => }/private/index_view.hh | 4 +- .../mongocxx => }/private/libbson.cpp | 2 +- .../{v_noabi/mongocxx => }/private/libbson.hh | 4 +- .../mongocxx => }/private/libmongoc.cpp | 2 +- .../mongocxx => }/private/libmongoc.hh | 4 +- .../private/libmongoc_symbols.hh | 0 .../mongocxx => }/private/numeric_casting.cpp | 2 +- .../mongocxx => }/private/numeric_casting.hh | 4 +- .../mongocxx => }/private/pipeline.hh | 4 +- .../{v_noabi/mongocxx => }/private/pool.hh | 4 +- .../mongocxx => }/private/read_concern.hh | 4 +- .../mongocxx => }/private/read_preference.hh | 4 +- .../private/scoped_bson_value.hh | 0 .../private/search_index_model.hh | 4 +- .../private/search_index_view.hh | 4 +- .../{v_noabi/mongocxx => }/private/uri.hh | 4 +- .../mongocxx => }/private/write_concern.hh | 4 +- .../test_util/export_for_testing.hh | 4 +- .../{v_noabi/mongocxx => }/test_util/mock.hh | 4 +- .../mongocxx/v_noabi/mongocxx/bulk_write.cpp | 2 +- .../v_noabi/mongocxx/change_stream.cpp | 2 +- .../lib/mongocxx/v_noabi/mongocxx/client.cpp | 2 +- .../v_noabi/mongocxx/client_encryption.cpp | 2 +- .../v_noabi/mongocxx/client_session.cpp | 2 +- .../mongocxx/v_noabi/mongocxx/collection.cpp | 2 +- .../lib/mongocxx/v_noabi/mongocxx/cursor.cpp | 2 +- .../mongocxx/v_noabi/mongocxx/database.cpp | 2 +- .../mongocxx/events/command_failed_event.cpp | 2 +- .../mongocxx/events/command_started_event.cpp | 2 +- .../events/command_succeeded_event.cpp | 2 +- .../events/heartbeat_failed_event.cpp | 2 +- .../events/heartbeat_started_event.cpp | 2 +- .../events/heartbeat_succeeded_event.cpp | 2 +- .../mongocxx/events/server_changed_event.cpp | 2 +- .../mongocxx/events/server_closed_event.cpp | 2 +- .../mongocxx/events/server_description.cpp | 2 +- .../mongocxx/events/server_opening_event.cpp | 2 +- .../events/topology_changed_event.cpp | 2 +- .../mongocxx/events/topology_closed_event.cpp | 2 +- .../mongocxx/events/topology_description.cpp | 2 +- .../events/topology_opening_event.cpp | 2 +- .../v_noabi/mongocxx/exception/error_code.cpp | 2 +- .../exception/operation_exception.cpp | 2 +- .../exception/private/mongoc_error.hh | 4 +- .../mongocxx/exception/server_error_code.cpp | 2 +- .../v_noabi/mongocxx/gridfs/bucket.cpp | 2 +- .../v_noabi/mongocxx/gridfs/downloader.cpp | 2 +- .../v_noabi/mongocxx/gridfs/private/bucket.hh | 4 +- .../mongocxx/gridfs/private/downloader.hh | 4 +- .../mongocxx/gridfs/private/uploader.hh | 4 +- .../v_noabi/mongocxx/gridfs/uploader.cpp | 2 +- .../lib/mongocxx/v_noabi/mongocxx/hint.cpp | 2 +- .../mongocxx/v_noabi/mongocxx/index_model.cpp | 2 +- .../mongocxx/v_noabi/mongocxx/index_view.cpp | 2 +- .../mongocxx/v_noabi/mongocxx/instance.cpp | 2 +- .../lib/mongocxx/v_noabi/mongocxx/logger.cpp | 2 +- .../v_noabi/mongocxx/model/delete_many.cpp | 2 +- .../v_noabi/mongocxx/model/delete_one.cpp | 2 +- .../v_noabi/mongocxx/model/insert_one.cpp | 2 +- .../v_noabi/mongocxx/model/replace_one.cpp | 2 +- .../v_noabi/mongocxx/model/update_many.cpp | 2 +- .../v_noabi/mongocxx/model/update_one.cpp | 2 +- .../mongocxx/v_noabi/mongocxx/model/write.cpp | 2 +- .../v_noabi/mongocxx/options/aggregate.cpp | 2 +- .../mongocxx/v_noabi/mongocxx/options/apm.cpp | 2 +- .../mongocxx/options/auto_encryption.cpp | 2 +- .../v_noabi/mongocxx/options/bulk_write.cpp | 2 +- .../mongocxx/options/change_stream.cpp | 2 +- .../v_noabi/mongocxx/options/client.cpp | 2 +- .../mongocxx/options/client_encryption.cpp | 2 +- .../mongocxx/options/client_session.cpp | 2 +- .../v_noabi/mongocxx/options/count.cpp | 2 +- .../v_noabi/mongocxx/options/delete.cpp | 2 +- .../v_noabi/mongocxx/options/distinct.cpp | 2 +- .../v_noabi/mongocxx/options/encrypt.cpp | 2 +- .../options/estimated_document_count.cpp | 2 +- .../v_noabi/mongocxx/options/find.cpp | 2 +- .../mongocxx/options/find_one_and_delete.cpp | 2 +- .../mongocxx/options/find_one_and_replace.cpp | 2 +- .../mongocxx/options/find_one_and_update.cpp | 2 +- .../mongocxx/options/gridfs/bucket.cpp | 2 +- .../mongocxx/options/gridfs/upload.cpp | 2 +- .../v_noabi/mongocxx/options/index.cpp | 2 +- .../v_noabi/mongocxx/options/index_view.cpp | 2 +- .../v_noabi/mongocxx/options/insert.cpp | 2 +- .../v_noabi/mongocxx/options/pool.cpp | 2 +- .../v_noabi/mongocxx/options/private/apm.hh | 4 +- .../mongocxx/options/private/server_api.hh | 4 +- .../v_noabi/mongocxx/options/private/ssl.hh | 4 +- .../mongocxx/options/private/transaction.hh | 4 +- .../v_noabi/mongocxx/options/replace.cpp | 2 +- .../mongocxx/options/rewrap_many_datakey.cpp | 2 +- .../v_noabi/mongocxx/options/server_api.cpp | 2 +- .../mongocxx/v_noabi/mongocxx/options/tls.cpp | 2 +- .../v_noabi/mongocxx/options/transaction.cpp | 4 +- .../v_noabi/mongocxx/options/update.cpp | 2 +- .../mongocxx/v_noabi/mongocxx/pipeline.cpp | 2 +- .../lib/mongocxx/v_noabi/mongocxx/pool.cpp | 2 +- .../v_noabi/mongocxx/read_concern.cpp | 2 +- .../v_noabi/mongocxx/read_preference.cpp | 2 +- .../v_noabi/mongocxx/result/bulk_write.cpp | 2 +- .../v_noabi/mongocxx/result/delete.cpp | 2 +- .../v_noabi/mongocxx/result/gridfs/upload.cpp | 2 +- .../v_noabi/mongocxx/result/insert_many.cpp | 2 +- .../v_noabi/mongocxx/result/insert_one.cpp | 2 +- .../v_noabi/mongocxx/result/replace_one.cpp | 2 +- .../mongocxx/result/rewrap_many_datakey.cpp | 2 +- .../v_noabi/mongocxx/result/update.cpp | 2 +- .../v_noabi/mongocxx/search_index_model.cpp | 2 +- .../v_noabi/mongocxx/search_index_view.cpp | 2 +- .../lib/mongocxx/v_noabi/mongocxx/uri.cpp | 2 +- .../v_noabi/mongocxx/validation_criteria.cpp | 2 +- .../v_noabi/mongocxx/write_concern.cpp | 2 +- src/mongocxx/test/catch_helpers.hh | 4 +- src/mongocxx/test/client.cpp | 2 +- src/mongocxx/test/client_helpers.cpp | 2 +- src/mongocxx/test/client_helpers.hh | 4 +- src/mongocxx/test/pool.cpp | 2 +- src/mongocxx/test/spec/monitoring.cpp | 4 +- src/mongocxx/test/spec/monitoring.hh | 4 +- src/mongocxx/test/spec/operation.cpp | 4 +- src/mongocxx/test/spec/operation.hh | 4 +- .../test/spec/unified_tests/assert.hh | 4 +- .../test/spec/unified_tests/entity.hh | 4 +- .../test/spec/unified_tests/operations.hh | 4 +- src/mongocxx/test/spec/util.cpp | 4 +- src/mongocxx/test/spec/util.hh | 4 +- 177 files changed, 278 insertions(+), 268 deletions(-) rename src/bsoncxx/lib/bsoncxx/{v_noabi/bsoncxx => }/private/b64_ntop.hh (100%) rename src/bsoncxx/lib/bsoncxx/{v_noabi/bsoncxx/config/private => private/config}/config.hh.in (100%) rename src/bsoncxx/lib/bsoncxx/{v_noabi/bsoncxx/config/private => private/config}/postlude.hh (100%) rename src/bsoncxx/lib/bsoncxx/{v_noabi/bsoncxx/config/private => private/config}/prelude.hh (94%) rename src/bsoncxx/lib/bsoncxx/{v_noabi/bsoncxx => }/private/helpers.hh (94%) rename src/bsoncxx/lib/bsoncxx/{v_noabi/bsoncxx => }/private/itoa.cpp (99%) rename src/bsoncxx/lib/bsoncxx/{v_noabi/bsoncxx => }/private/itoa.hh (93%) rename src/bsoncxx/lib/bsoncxx/{v_noabi/bsoncxx => }/private/libbson.hh (100%) rename src/bsoncxx/lib/bsoncxx/{v_noabi/bsoncxx => }/private/make_unique.hh (100%) rename src/bsoncxx/lib/bsoncxx/{v_noabi/bsoncxx => }/private/stack.hh (98%) rename src/bsoncxx/lib/bsoncxx/{v_noabi/bsoncxx => }/private/suppress_deprecation_warnings.hh (100%) rename src/bsoncxx/lib/bsoncxx/{v_noabi/bsoncxx => }/test_util/export_for_testing.hh (92%) rename src/mongocxx/lib/mongocxx/{v_noabi/mongocxx => }/private/append_aggregate_options.hh (94%) rename src/mongocxx/lib/mongocxx/{v_noabi/mongocxx => }/private/bulk_write.hh (92%) rename src/mongocxx/lib/mongocxx/{v_noabi/mongocxx => }/private/change_stream.hh (97%) rename src/mongocxx/lib/mongocxx/{v_noabi/mongocxx => }/private/client.hh (93%) rename src/mongocxx/lib/mongocxx/{v_noabi/mongocxx => }/private/client_encryption.hh (99%) rename src/mongocxx/lib/mongocxx/{v_noabi/mongocxx => }/private/client_session.hh (98%) rename src/mongocxx/lib/mongocxx/{v_noabi/mongocxx => }/private/collection.hh (95%) rename src/mongocxx/lib/mongocxx/{v_noabi/mongocxx/config/private => private/config}/config.hh.in (100%) rename src/mongocxx/lib/mongocxx/{v_noabi/mongocxx/config/private => private/config}/postlude.hh (100%) rename src/mongocxx/lib/mongocxx/{v_noabi/mongocxx/config/private => private/config}/prelude.hh (95%) rename src/mongocxx/lib/mongocxx/{v_noabi/mongocxx => }/private/conversions.cpp (97%) rename src/mongocxx/lib/mongocxx/{v_noabi/mongocxx => }/private/conversions.hh (92%) rename src/mongocxx/lib/mongocxx/{v_noabi/mongocxx => }/private/cursor.hh (96%) rename src/mongocxx/lib/mongocxx/{v_noabi/mongocxx => }/private/database.hh (94%) rename src/mongocxx/lib/mongocxx/{v_noabi/mongocxx => }/private/index_view.hh (99%) rename src/mongocxx/lib/mongocxx/{v_noabi/mongocxx => }/private/libbson.cpp (98%) rename src/mongocxx/lib/mongocxx/{v_noabi/mongocxx => }/private/libbson.hh (98%) rename src/mongocxx/lib/mongocxx/{v_noabi/mongocxx => }/private/libmongoc.cpp (96%) rename src/mongocxx/lib/mongocxx/{v_noabi/mongocxx => }/private/libmongoc.hh (96%) rename src/mongocxx/lib/mongocxx/{v_noabi/mongocxx => }/private/libmongoc_symbols.hh (100%) rename src/mongocxx/lib/mongocxx/{v_noabi/mongocxx => }/private/numeric_casting.cpp (97%) rename src/mongocxx/lib/mongocxx/{v_noabi/mongocxx => }/private/numeric_casting.hh (95%) rename src/mongocxx/lib/mongocxx/{v_noabi/mongocxx => }/private/pipeline.hh (92%) rename src/mongocxx/lib/mongocxx/{v_noabi/mongocxx => }/private/pool.hh (93%) rename src/mongocxx/lib/mongocxx/{v_noabi/mongocxx => }/private/read_concern.hh (92%) rename src/mongocxx/lib/mongocxx/{v_noabi/mongocxx => }/private/read_preference.hh (92%) rename src/mongocxx/lib/mongocxx/{v_noabi/mongocxx => }/private/scoped_bson_value.hh (100%) rename src/mongocxx/lib/mongocxx/{v_noabi/mongocxx => }/private/search_index_model.hh (88%) rename src/mongocxx/lib/mongocxx/{v_noabi/mongocxx => }/private/search_index_view.hh (98%) rename src/mongocxx/lib/mongocxx/{v_noabi/mongocxx => }/private/uri.hh (92%) rename src/mongocxx/lib/mongocxx/{v_noabi/mongocxx => }/private/write_concern.hh (92%) rename src/mongocxx/lib/mongocxx/{v_noabi/mongocxx => }/test_util/export_for_testing.hh (91%) rename src/mongocxx/lib/mongocxx/{v_noabi/mongocxx => }/test_util/mock.hh (98%) diff --git a/.clang-format b/.clang-format index e75951136a..1c8e6c6bdb 100644 --- a/.clang-format +++ b/.clang-format @@ -164,9 +164,9 @@ IncludeCategories: Priority: 28 - Regex: 'mongocxx/v1/.*\.hh' # v1 private headers Priority: 29 - - Regex: 'bsoncxx/config(/private)?/prelude\.(hpp|hh)' # v_noabi preludes + - Regex: 'bsoncxx/(private/)?config/prelude\.(hpp|hh)' # v_noabi preludes Priority: 60 - - Regex: 'mongocxx/config(/private)?/prelude\.(hpp|hh)' # v_noabi preludes + - Regex: 'mongocxx/(private/)?config/prelude\.(hpp|hh)' # v_noabi preludes Priority: 61 - Regex: 'bsoncxx/test/.*' # test headers Priority: 70 diff --git a/src/bsoncxx/lib/CMakeLists.txt b/src/bsoncxx/lib/CMakeLists.txt index 4103e8c825..c5a6930cae 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} ) @@ -54,8 +58,8 @@ 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 + bsoncxx/private/config/config.hh.in + bsoncxx/private/config/config.hh ) endif() @@ -81,19 +85,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/private/b64_ntop.hh + bsoncxx/private/config/config.hh.in + bsoncxx/private/config/postlude.hh + bsoncxx/private/config/prelude.hh + bsoncxx/private/helpers.hh + bsoncxx/private/itoa.hh + bsoncxx/private/libbson.hh + bsoncxx/private/make_unique.hh + bsoncxx/private/stack.hh + bsoncxx/private/suppress_deprecation_warnings.hh + 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/v1/config/config.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 100% rename from src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/private/b64_ntop.hh rename to src/bsoncxx/lib/bsoncxx/private/b64_ntop.hh 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/config/private/postlude.hh b/src/bsoncxx/lib/bsoncxx/private/config/postlude.hh similarity index 100% rename from src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/config/private/postlude.hh rename to src/bsoncxx/lib/bsoncxx/private/config/postlude.hh diff --git a/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/config/private/prelude.hh b/src/bsoncxx/lib/bsoncxx/private/config/prelude.hh similarity index 94% rename from src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/config/private/prelude.hh rename to src/bsoncxx/lib/bsoncxx/private/config/prelude.hh index 2121524065..bae02463d1 100644 --- a/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/config/private/prelude.hh +++ b/src/bsoncxx/lib/bsoncxx/private/config/prelude.hh @@ -17,4 +17,4 @@ // NOTE: Push any macros here that are defined by the following // headers here. -#include +#include diff --git a/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/private/helpers.hh b/src/bsoncxx/lib/bsoncxx/private/helpers.hh similarity index 94% rename from src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/private/helpers.hh rename to src/bsoncxx/lib/bsoncxx/private/helpers.hh index 32d887d303..adf9be842e 100644 --- a/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/private/helpers.hh +++ b/src/bsoncxx/lib/bsoncxx/private/helpers.hh @@ -19,7 +19,7 @@ #include #include -#include +#include namespace bsoncxx { namespace helpers { @@ -48,4 +48,4 @@ inline bsoncxx::v_noabi::oid make_oid(bson_oid_t const* bson_oid) { } // namespace helpers } // namespace bsoncxx -#include +#include diff --git a/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/private/itoa.cpp b/src/bsoncxx/lib/bsoncxx/private/itoa.cpp similarity index 99% rename from src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/private/itoa.cpp rename to src/bsoncxx/lib/bsoncxx/private/itoa.cpp index 85c540854b..e0033ade82 100644 --- a/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/private/itoa.cpp +++ b/src/bsoncxx/lib/bsoncxx/private/itoa.cpp @@ -14,7 +14,7 @@ #include -#include +#include namespace bsoncxx { diff --git a/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/private/itoa.hh b/src/bsoncxx/lib/bsoncxx/private/itoa.hh similarity index 93% rename from src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/private/itoa.hh rename to src/bsoncxx/lib/bsoncxx/private/itoa.hh index af23dea484..43fc24d67d 100644 --- a/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/private/itoa.hh +++ b/src/bsoncxx/lib/bsoncxx/private/itoa.hh @@ -19,7 +19,7 @@ #include -#include +#include namespace bsoncxx { @@ -60,4 +60,4 @@ class itoa { } // namespace bsoncxx -#include +#include diff --git a/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/private/libbson.hh b/src/bsoncxx/lib/bsoncxx/private/libbson.hh similarity index 100% rename from src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/private/libbson.hh rename to src/bsoncxx/lib/bsoncxx/private/libbson.hh 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 100% rename from src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/private/make_unique.hh rename to src/bsoncxx/lib/bsoncxx/private/make_unique.hh diff --git a/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/private/stack.hh b/src/bsoncxx/lib/bsoncxx/private/stack.hh similarity index 98% rename from src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/private/stack.hh rename to src/bsoncxx/lib/bsoncxx/private/stack.hh index 173edaf6d2..b261e19b8d 100644 --- a/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/private/stack.hh +++ b/src/bsoncxx/lib/bsoncxx/private/stack.hh @@ -18,7 +18,7 @@ #include #include -#include +#include namespace bsoncxx { @@ -162,4 +162,4 @@ class stack { } // namespace bsoncxx -#include +#include diff --git a/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/private/suppress_deprecation_warnings.hh b/src/bsoncxx/lib/bsoncxx/private/suppress_deprecation_warnings.hh similarity index 100% rename from src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/private/suppress_deprecation_warnings.hh rename to src/bsoncxx/lib/bsoncxx/private/suppress_deprecation_warnings.hh diff --git a/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/test_util/export_for_testing.hh b/src/bsoncxx/lib/bsoncxx/test_util/export_for_testing.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/test_util/export_for_testing.hh index daeda50ae9..bd75d3e024 100644 --- a/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/test_util/export_for_testing.hh +++ b/src/bsoncxx/lib/bsoncxx/test_util/export_for_testing.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 @@ -29,4 +29,4 @@ #define BSONCXX_ABI_EXPORT_CDECL_TESTING(...) __VA_ARGS__ #endif -#include +#include 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..4a071bc3da 100644 --- a/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/array/element.cpp +++ b/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/array/element.cpp @@ -17,7 +17,7 @@ #include #include -#include +#include namespace bsoncxx { namespace v_noabi { 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..57f20ecaf5 100644 --- a/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/array/value.cpp +++ b/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/array/value.cpp @@ -16,7 +16,7 @@ #include -#include +#include namespace bsoncxx { namespace v_noabi { 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..eb1348b10f 100644 --- a/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/array/view.cpp +++ b/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/array/view.cpp @@ -21,7 +21,7 @@ #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..a5938e0985 100644 --- a/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/builder/core.cpp +++ b/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/builder/core.cpp @@ -27,7 +27,7 @@ #include #include -#include +#include namespace bsoncxx { namespace v_noabi { diff --git a/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/decimal128.cpp b/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/decimal128.cpp index a710ccc280..7ad4c977aa 100644 --- a/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/decimal128.cpp +++ b/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/decimal128.cpp @@ -19,7 +19,7 @@ #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..a1e744bb0c 100644 --- a/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/document/element.cpp +++ b/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/document/element.cpp @@ -24,7 +24,7 @@ #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..d8873b1853 100644 --- a/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/document/value.cpp +++ b/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/document/value.cpp @@ -16,7 +16,7 @@ #include -#include +#include namespace bsoncxx { namespace v_noabi { 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..05f1169ed4 100644 --- a/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/document/view.cpp +++ b/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/document/view.cpp @@ -19,7 +19,7 @@ #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..4d7904bda3 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,7 +16,7 @@ #include -#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..f7079f73b2 100644 --- a/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/json.cpp +++ b/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/json.cpp @@ -25,7 +25,7 @@ #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..955298bd5c 100644 --- a/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/oid.cpp +++ b/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/oid.cpp @@ -19,7 +19,7 @@ #include #include -#include +#include namespace bsoncxx { namespace v_noabi { 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..cc4a6e3034 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,7 +15,7 @@ #include #include -#include +#include namespace bsoncxx { namespace v_noabi { diff --git a/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/types.cpp b/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/types.cpp index 76e8ae0348..54b3b6b501 100644 --- a/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/types.cpp +++ b/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/types.cpp @@ -14,7 +14,7 @@ #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/private/value.hh index 0c7d34d6ab..2932f42d7d 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/private/value.hh @@ -18,7 +18,7 @@ #include #include -#include +#include namespace bsoncxx { namespace v_noabi { @@ -65,4 +65,4 @@ inline bson_value::value make_owning_bson(void* internal_value) { } // namespace v_noabi } // namespace bsoncxx -#include +#include 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..141a1c67ab 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 @@ -19,7 +19,7 @@ #include #include -#include +#include namespace bsoncxx { namespace v_noabi { 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..b9e9a3d90e 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 @@ -21,7 +21,7 @@ #include #include -#include +#include #define BSONCXX_CITER \ bson_iter_t iter; \ diff --git a/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/types/private/convert.hh b/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/types/private/convert.hh index 8d8b38a96a..a868403f8f 100644 --- a/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/types/private/convert.hh +++ b/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/types/private/convert.hh @@ -21,7 +21,7 @@ #include #include -#include +#include namespace bsoncxx { namespace v_noabi { @@ -327,4 +327,4 @@ inline void convert_from_libbson(bson_value_t const* v, b_array* out) { } // namespace v_noabi } // namespace bsoncxx -#include +#include diff --git a/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/validate.cpp b/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/validate.cpp index 51a38f768d..491624d735 100644 --- a/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/validate.cpp +++ b/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/validate.cpp @@ -16,7 +16,7 @@ #include #include -#include +#include namespace bsoncxx { namespace v_noabi { diff --git a/src/bsoncxx/test/catch.hh b/src/bsoncxx/test/catch.hh index aef7695024..2ebd064c63 100644 --- a/src/bsoncxx/test/catch.hh +++ b/src/bsoncxx/test/catch.hh @@ -20,7 +20,7 @@ #include #include -#include +#include #include @@ -149,4 +149,4 @@ struct StringMaker { } // namespace Catch -#include +#include diff --git a/src/bsoncxx/test/exception_guard.hh b/src/bsoncxx/test/exception_guard.hh index 3fdfa14f80..f922413c73 100644 --- a/src/bsoncxx/test/exception_guard.hh +++ b/src/bsoncxx/test/exception_guard.hh @@ -23,7 +23,7 @@ #include -#include +#include #include @@ -102,4 +102,4 @@ struct exception_guard_state { } // namespace test } // namespace bsoncxx -#include +#include diff --git a/src/bsoncxx/test/to_string.hh b/src/bsoncxx/test/to_string.hh index 18da14f8ff..eb600ce7d3 100644 --- a/src/bsoncxx/test/to_string.hh +++ b/src/bsoncxx/test/to_string.hh @@ -26,7 +26,7 @@ #include #include -#include +#include namespace bsoncxx { @@ -93,4 +93,4 @@ inline std::string to_string(bsoncxx::v_noabi::types::bson_value::view_or_value } // namespace bsoncxx -#include +#include diff --git a/src/mongocxx/lib/CMakeLists.txt b/src/mongocxx/lib/CMakeLists.txt index 0a4fb40d9e..180404c031 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/conversions.cpp + mongocxx/private/libbson.cpp + mongocxx/private/libmongoc.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,11 +178,38 @@ 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/private/append_aggregate_options.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/config/postlude.hh + mongocxx/private/config/prelude.hh + mongocxx/private/conversions.hh + mongocxx/private/cursor.hh + mongocxx/private/database.hh + mongocxx/private/index_view.hh + mongocxx/private/libbson.hh + mongocxx/private/libmongoc_symbols.hh + mongocxx/private/libmongoc.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/test_util/export_for_testing.hh + mongocxx/test_util/mock.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 @@ -187,32 +218,6 @@ set_dist_list(src_mongocxx_lib_DIST 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/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..a1dbb54108 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,7 +4,7 @@ #include -#include +#include namespace mongocxx { namespace v_noabi { @@ -57,4 +57,4 @@ inline void append_aggregate_options( } // namespace v_noabi } // namespace mongocxx -#include +#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 92% 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..7b1c06e580 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/bulk_write.hh +++ b/src/mongocxx/lib/mongocxx/private/bulk_write.hh @@ -17,7 +17,7 @@ #include #include -#include +#include namespace mongocxx { namespace v_noabi { @@ -43,4 +43,4 @@ class bulk_write::impl { } // namespace v_noabi } // namespace mongocxx -#include +#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 97% 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..33505a343a 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/change_stream.hh +++ b/src/mongocxx/lib/mongocxx/private/change_stream.hh @@ -23,7 +23,7 @@ #include #include -#include +#include namespace mongocxx { namespace v_noabi { @@ -123,4 +123,4 @@ class change_stream::impl { } // namespace v_noabi } // namespace mongocxx -#include +#include diff --git a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/client.hh b/src/mongocxx/lib/mongocxx/private/client.hh similarity index 93% rename from src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/client.hh rename to src/mongocxx/lib/mongocxx/private/client.hh index 3f6c23e478..c9ba53c53e 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/client.hh +++ b/src/mongocxx/lib/mongocxx/private/client.hh @@ -20,7 +20,7 @@ #include #include -#include +#include namespace mongocxx { namespace v_noabi { @@ -47,4 +47,4 @@ class client::impl { } // namespace v_noabi } // namespace mongocxx -#include +#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 99% 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..351ce3bad7 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/client_encryption.hh +++ b/src/mongocxx/lib/mongocxx/private/client_encryption.hh @@ -36,7 +36,7 @@ #include #include -#include +#include namespace mongocxx { namespace v_noabi { @@ -364,4 +364,4 @@ class client_encryption::impl { } // namespace v_noabi } // namespace mongocxx -#include +#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 98% 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..2a8cb33d88 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/client_session.hh +++ b/src/mongocxx/lib/mongocxx/private/client_session.hh @@ -31,7 +31,7 @@ #include #include -#include +#include namespace mongocxx { namespace v_noabi { @@ -242,4 +242,4 @@ class client_session::impl { } // namespace v_noabi } // namespace mongocxx -#include +#include diff --git a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/collection.hh b/src/mongocxx/lib/mongocxx/private/collection.hh similarity index 95% rename from src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/collection.hh rename to src/mongocxx/lib/mongocxx/private/collection.hh index 3d9487eb5f..c00f9ede36 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/collection.hh +++ b/src/mongocxx/lib/mongocxx/private/collection.hh @@ -25,7 +25,7 @@ #include #include -#include +#include namespace mongocxx { namespace v_noabi { @@ -67,4 +67,4 @@ class collection::impl { } // namespace v_noabi } // namespace mongocxx -#include +#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/config/private/postlude.hh b/src/mongocxx/lib/mongocxx/private/config/postlude.hh similarity index 100% rename from src/mongocxx/lib/mongocxx/v_noabi/mongocxx/config/private/postlude.hh rename to src/mongocxx/lib/mongocxx/private/config/postlude.hh diff --git a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/config/private/prelude.hh b/src/mongocxx/lib/mongocxx/private/config/prelude.hh similarity index 95% rename from src/mongocxx/lib/mongocxx/v_noabi/mongocxx/config/private/prelude.hh rename to src/mongocxx/lib/mongocxx/private/config/prelude.hh index d01e52a4fa..0cddf0e046 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/config/private/prelude.hh +++ b/src/mongocxx/lib/mongocxx/private/config/prelude.hh @@ -25,4 +25,4 @@ #pragma push_macro("MONGOCXX_COMPILER_VERSION") #undef MONGOCXX_COMPILER_VERSION -#include +#include 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..0e67d84edd 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/conversions.cpp +++ b/src/mongocxx/lib/mongocxx/private/conversions.cpp @@ -16,7 +16,7 @@ #include -#include +#include namespace mongocxx { namespace libmongoc { diff --git a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/conversions.hh b/src/mongocxx/lib/mongocxx/private/conversions.hh similarity index 92% rename from src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/conversions.hh rename to src/mongocxx/lib/mongocxx/private/conversions.hh index b22508102a..1ff36733a9 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/conversions.hh +++ b/src/mongocxx/lib/mongocxx/private/conversions.hh @@ -18,7 +18,7 @@ #include #include -#include +#include namespace mongocxx { namespace libmongoc { @@ -34,4 +34,4 @@ read_mode_from_read_mode_t(mongoc_read_mode_t read_mode); } // namespace libmongoc } // namespace mongocxx -#include +#include diff --git a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/cursor.hh b/src/mongocxx/lib/mongocxx/private/cursor.hh similarity index 96% rename from src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/cursor.hh rename to src/mongocxx/lib/mongocxx/private/cursor.hh index f0e88fe2f7..974568682f 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/cursor.hh +++ b/src/mongocxx/lib/mongocxx/private/cursor.hh @@ -20,7 +20,7 @@ #include #include -#include +#include namespace mongocxx { namespace v_noabi { @@ -92,4 +92,4 @@ class cursor::impl { } // namespace v_noabi } // namespace mongocxx -#include +#include diff --git a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/database.hh b/src/mongocxx/lib/mongocxx/private/database.hh similarity index 94% rename from src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/database.hh rename to src/mongocxx/lib/mongocxx/private/database.hh index 7b48416588..5275d46dfb 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/database.hh +++ b/src/mongocxx/lib/mongocxx/private/database.hh @@ -20,7 +20,7 @@ #include #include -#include +#include namespace mongocxx { namespace v_noabi { @@ -56,4 +56,4 @@ class database::impl { } // namespace v_noabi } // namespace mongocxx -#include +#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 99% 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..e22a9a932d 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/index_view.hh +++ b/src/mongocxx/lib/mongocxx/private/index_view.hh @@ -32,7 +32,7 @@ #include #include -#include +#include namespace mongocxx { namespace v_noabi { @@ -277,4 +277,4 @@ class index_view::impl { } // namespace v_noabi } // namespace mongocxx -#include +#include diff --git a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/libbson.cpp b/src/mongocxx/lib/mongocxx/private/libbson.cpp similarity index 98% rename from src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/libbson.cpp rename to src/mongocxx/lib/mongocxx/private/libbson.cpp index 2486223763..38e66ce748 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/libbson.cpp +++ b/src/mongocxx/lib/mongocxx/private/libbson.cpp @@ -14,7 +14,7 @@ #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/libbson.hh similarity index 98% rename from src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/libbson.hh rename to src/mongocxx/lib/mongocxx/private/libbson.hh index 71ca614bf5..89203843ab 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/libbson.hh +++ b/src/mongocxx/lib/mongocxx/private/libbson.hh @@ -22,7 +22,7 @@ #include -#include +#include namespace mongocxx { namespace libbson { @@ -162,4 +162,4 @@ class scoped_bson_t { } // namespace libbson } // namespace mongocxx -#include +#include diff --git a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/libmongoc.cpp b/src/mongocxx/lib/mongocxx/private/libmongoc.cpp similarity index 96% rename from src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/libmongoc.cpp rename to src/mongocxx/lib/mongocxx/private/libmongoc.cpp index 2ecf27c816..b51fe2a324 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/libmongoc.cpp +++ b/src/mongocxx/lib/mongocxx/private/libmongoc.cpp @@ -14,7 +14,7 @@ #include "libmongoc.hh" -#include +#include namespace mongocxx { namespace libmongoc { diff --git a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/libmongoc.hh b/src/mongocxx/lib/mongocxx/private/libmongoc.hh similarity index 96% rename from src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/libmongoc.hh rename to src/mongocxx/lib/mongocxx/private/libmongoc.hh index fc86e6083a..6be7c50709 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/libmongoc.hh +++ b/src/mongocxx/lib/mongocxx/private/libmongoc.hh @@ -37,7 +37,7 @@ #include #include -#include +#include namespace mongocxx { namespace libmongoc { @@ -84,4 +84,4 @@ constexpr auto log_set_handler = mongoc_log_set_handler; } // namespace libmongoc } // namespace mongocxx -#include +#include diff --git a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/libmongoc_symbols.hh b/src/mongocxx/lib/mongocxx/private/libmongoc_symbols.hh similarity index 100% rename from src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/libmongoc_symbols.hh rename to src/mongocxx/lib/mongocxx/private/libmongoc_symbols.hh 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..b7ed540a1c 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/numeric_casting.cpp +++ b/src/mongocxx/lib/mongocxx/private/numeric_casting.cpp @@ -16,7 +16,7 @@ #include -#include +#include namespace mongocxx { 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 95% 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..e8106f5136 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/numeric_casting.hh +++ b/src/mongocxx/lib/mongocxx/private/numeric_casting.hh @@ -19,7 +19,7 @@ #include -#include +#include namespace mongocxx { @@ -45,4 +45,4 @@ MONGOCXX_ABI_EXPORT_CDECL_TESTING(bool) int64_to_size_t_safe(int64_t const in, s } // namespace mongocxx -#include +#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..75dd51ca47 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/pipeline.hh +++ b/src/mongocxx/lib/mongocxx/private/pipeline.hh @@ -18,7 +18,7 @@ #include -#include +#include namespace mongocxx { namespace v_noabi { @@ -47,4 +47,4 @@ class pipeline::impl { } // namespace v_noabi } // namespace mongocxx -#include +#include diff --git a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/pool.hh b/src/mongocxx/lib/mongocxx/private/pool.hh similarity index 93% rename from src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/pool.hh rename to src/mongocxx/lib/mongocxx/private/pool.hh index 717ce6e28d..1d9df1de2d 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/pool.hh +++ b/src/mongocxx/lib/mongocxx/private/pool.hh @@ -20,7 +20,7 @@ #include #include -#include +#include namespace mongocxx { namespace v_noabi { @@ -47,4 +47,4 @@ class pool::impl { } // namespace v_noabi } // namespace mongocxx -#include +#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 92% 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..1814a236f6 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/read_concern.hh +++ b/src/mongocxx/lib/mongocxx/private/read_concern.hh @@ -17,7 +17,7 @@ #include #include -#include +#include namespace mongocxx { namespace v_noabi { @@ -42,4 +42,4 @@ class read_concern::impl { } // namespace v_noabi } // namespace mongocxx -#include +#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 92% 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..26af6dc49c 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/read_preference.hh +++ b/src/mongocxx/lib/mongocxx/private/read_preference.hh @@ -17,7 +17,7 @@ #include #include -#include +#include namespace mongocxx { namespace v_noabi { @@ -42,4 +42,4 @@ class read_preference::impl { } // namespace v_noabi } // namespace mongocxx -#include +#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 100% 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 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..0d1e4ce445 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,7 +4,7 @@ #include -#include +#include namespace mongocxx { namespace v_noabi { @@ -23,4 +23,4 @@ class search_index_model::impl { } // namespace v_noabi } // namespace mongocxx -#include +#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 98% 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..45f5e22605 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/search_index_view.hh +++ b/src/mongocxx/lib/mongocxx/private/search_index_view.hh @@ -13,7 +13,7 @@ #include #include -#include +#include namespace mongocxx { namespace v_noabi { @@ -206,4 +206,4 @@ class search_index_view::impl { } // namespace v_noabi } // namespace mongocxx -#include +#include diff --git a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/uri.hh b/src/mongocxx/lib/mongocxx/private/uri.hh similarity index 92% rename from src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/uri.hh rename to src/mongocxx/lib/mongocxx/private/uri.hh index ad8edf0706..b2622f71a0 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/uri.hh +++ b/src/mongocxx/lib/mongocxx/private/uri.hh @@ -17,7 +17,7 @@ #include #include -#include +#include namespace mongocxx { namespace v_noabi { @@ -38,4 +38,4 @@ class uri::impl { } // namespace v_noabi } // namespace mongocxx -#include +#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 92% 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..4275178ad6 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/write_concern.hh +++ b/src/mongocxx/lib/mongocxx/private/write_concern.hh @@ -17,7 +17,7 @@ #include #include -#include +#include namespace mongocxx { namespace v_noabi { @@ -42,4 +42,4 @@ class write_concern::impl { } // namespace v_noabi } // namespace mongocxx -#include +#include diff --git a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/test_util/export_for_testing.hh b/src/mongocxx/lib/mongocxx/test_util/export_for_testing.hh similarity index 91% rename from src/mongocxx/lib/mongocxx/v_noabi/mongocxx/test_util/export_for_testing.hh rename to src/mongocxx/lib/mongocxx/test_util/export_for_testing.hh index 4a0d149113..5f1e27cf96 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/test_util/export_for_testing.hh +++ b/src/mongocxx/lib/mongocxx/test_util/export_for_testing.hh @@ -14,7 +14,7 @@ #pragma once -#include +#include // See src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/test_util/export_for_testing.hh for an explanation of // the purpose of this header. @@ -27,4 +27,4 @@ #define MONGOCXX_ABI_EXPORT_CDECL_TESTING(...) __VA_ARGS__ #endif -#include +#include diff --git a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/test_util/mock.hh b/src/mongocxx/lib/mongocxx/test_util/mock.hh similarity index 98% rename from src/mongocxx/lib/mongocxx/v_noabi/mongocxx/test_util/mock.hh rename to src/mongocxx/lib/mongocxx/test_util/mock.hh index e505aa9d28..7fa69c505b 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/test_util/mock.hh +++ b/src/mongocxx/lib/mongocxx/test_util/mock.hh @@ -28,7 +28,7 @@ #include -#include +#include namespace mongocxx { namespace test_util { @@ -188,4 +188,4 @@ class mock { } // namespace test_util } // namespace mongocxx -#include +#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 ba146d48ba..2adac9da83 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/bulk_write.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/bulk_write.cpp @@ -28,7 +28,7 @@ #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..0f4ce64a5a 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/change_stream.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/change_stream.cpp @@ -20,7 +20,7 @@ #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..babf7fbb3a 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/client.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/client.cpp @@ -33,7 +33,7 @@ #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..e07f88645c 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/client_encryption.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/client_encryption.cpp @@ -18,7 +18,7 @@ #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..a6aaee4c40 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/client_session.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/client_session.cpp @@ -19,7 +19,7 @@ #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 506ae2878a..c35b87826c 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/collection.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/collection.cpp @@ -58,7 +58,7 @@ #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/cursor.cpp b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/cursor.cpp index 599b2dd203..4faaa7819a 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/cursor.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/cursor.cpp @@ -21,7 +21,7 @@ #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..2cba5b3966 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/database.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/database.cpp @@ -35,7 +35,7 @@ #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/events/command_failed_event.cpp b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/events/command_failed_event.cpp index 8996192c80..370bda1c82 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 @@ -21,7 +21,7 @@ #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..0100989410 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 @@ -18,7 +18,7 @@ #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..227a8f4005 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 @@ -18,7 +18,7 @@ #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..b15aa09547 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 @@ -15,7 +15,7 @@ #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..bfc4b857fb 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 @@ -15,7 +15,7 @@ #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..d50cc634af 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 @@ -15,7 +15,7 @@ #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..f959888439 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 @@ -15,7 +15,7 @@ #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..a32e58d562 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 @@ -15,7 +15,7 @@ #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..8fd4c4d4dd 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 @@ -15,7 +15,7 @@ #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..7f23feaa32 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 @@ -15,7 +15,7 @@ #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..297cbbec43 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 @@ -15,7 +15,7 @@ #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..e071c98448 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 @@ -15,7 +15,7 @@ #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..c293bc70d0 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 @@ -16,7 +16,7 @@ #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..af40e42302 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 @@ -15,7 +15,7 @@ #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..a77b57418d 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,7 +16,7 @@ #include -#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..afb30a0375 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 @@ -21,7 +21,7 @@ #include #include -#include +#include namespace mongocxx { namespace v_noabi { diff --git a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/exception/private/mongoc_error.hh b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/exception/private/mongoc_error.hh index 86d3263204..9da77f7d69 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/exception/private/mongoc_error.hh +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/exception/private/mongoc_error.hh @@ -20,7 +20,7 @@ #include #include -#include +#include namespace mongocxx { namespace v_noabi { @@ -65,4 +65,4 @@ void throw_exception(bsoncxx::v_noabi::document::value raw_server_error, ::bson_ } // namespace v_noabi } // namespace mongocxx -#include +#include 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..6e8baa63bf 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,7 +16,7 @@ #include -#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..022583a4e9 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/gridfs/bucket.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/gridfs/bucket.cpp @@ -34,7 +34,7 @@ #include #include -#include +#include namespace mongocxx { namespace v_noabi { 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..618ab3849e 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/gridfs/downloader.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/gridfs/downloader.cpp @@ -26,7 +26,7 @@ #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/private/bucket.hh index 5910a47f76..531babd964 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/gridfs/private/bucket.hh +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/gridfs/private/bucket.hh @@ -20,7 +20,7 @@ #include #include -#include +#include namespace mongocxx { namespace v_noabi { @@ -55,4 +55,4 @@ class bucket::impl { } // namespace v_noabi } // namespace mongocxx -#include +#include diff --git a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/gridfs/private/downloader.hh b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/gridfs/private/downloader.hh index 01959bb3b4..0e856a980b 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/gridfs/private/downloader.hh +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/gridfs/private/downloader.hh @@ -21,7 +21,7 @@ #include #include -#include +#include namespace mongocxx { namespace v_noabi { @@ -117,4 +117,4 @@ class downloader::impl { } // namespace v_noabi } // namespace mongocxx -#include +#include diff --git a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/gridfs/private/uploader.hh b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/gridfs/private/uploader.hh index b29a09f1e2..43e370129f 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/gridfs/private/uploader.hh +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/gridfs/private/uploader.hh @@ -22,7 +22,7 @@ #include -#include +#include namespace mongocxx { namespace v_noabi { @@ -91,4 +91,4 @@ class uploader::impl { } // namespace v_noabi } // namespace mongocxx -#include +#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..658f8b9df6 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/gridfs/uploader.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/gridfs/uploader.cpp @@ -27,7 +27,7 @@ #include #include -#include +#include namespace { diff --git a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/hint.cpp b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/hint.cpp index 2aac5c6013..67fca5358d 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/hint.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/hint.cpp @@ -18,7 +18,7 @@ #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/index_model.cpp b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/index_model.cpp index 75e4a65f80..b899925e22 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/index_model.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/index_model.cpp @@ -14,7 +14,7 @@ #include -#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..2654dcf1e0 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/index_view.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/index_view.cpp @@ -21,7 +21,7 @@ #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..c07dda6d77 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/instance.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/instance.cpp @@ -27,7 +27,7 @@ #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..715d243ffd 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/logger.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/logger.cpp @@ -14,7 +14,7 @@ #include -#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..d719fbb624 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,7 +14,7 @@ #include -#include +#include namespace mongocxx { namespace v_noabi { 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..d969e8b6e8 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,7 +14,7 @@ #include -#include +#include namespace mongocxx { namespace v_noabi { 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..dcc2c849d8 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,7 +14,7 @@ #include -#include +#include namespace mongocxx { namespace v_noabi { 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 5f3dbe79ba..3b2b99b02a 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,7 +14,7 @@ #include -#include +#include namespace mongocxx { namespace v_noabi { 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..51fc548670 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,7 +16,7 @@ #include -#include +#include namespace mongocxx { namespace v_noabi { 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 30a6d72564..4e9f9af855 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,7 +16,7 @@ #include -#include +#include namespace mongocxx { namespace v_noabi { 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..b4dbee3e14 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/model/write.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/model/write.cpp @@ -16,7 +16,7 @@ #include -#include +#include namespace mongocxx { namespace v_noabi { 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..f435bd0cb4 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/aggregate.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/aggregate.cpp @@ -18,7 +18,7 @@ #include #include -#include +#include namespace mongocxx { namespace v_noabi { 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..33bbe96257 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,7 @@ #include -#include +#include namespace mongocxx { namespace v_noabi { 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..d5f7182d69 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 @@ -22,7 +22,7 @@ #include #include -#include +#include namespace mongocxx { namespace v_noabi { 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..6f46732a53 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,7 +14,7 @@ #include -#include +#include namespace mongocxx { namespace v_noabi { 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..2eb65f5710 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,7 +22,7 @@ #include #include -#include +#include namespace mongocxx { namespace v_noabi { 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..517b3ebe82 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/client.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/client.cpp @@ -14,7 +14,7 @@ #include -#include +#include namespace mongocxx { namespace v_noabi { 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..3045a4072b 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 @@ -18,7 +18,7 @@ #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..9065fff6f1 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,7 +14,7 @@ #include -#include +#include namespace mongocxx { namespace v_noabi { 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..a8809e1f72 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/count.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/count.cpp @@ -15,7 +15,7 @@ #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..6a2d068c1a 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/delete.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/delete.cpp @@ -15,7 +15,7 @@ #include #include -#include +#include namespace mongocxx { namespace v_noabi { 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..1fb6abcd77 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/distinct.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/distinct.cpp @@ -15,7 +15,7 @@ #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..d18f8355d0 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/encrypt.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/encrypt.cpp @@ -23,7 +23,7 @@ #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..8498c4771a 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 @@ -15,7 +15,7 @@ #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..542639b8f5 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/find.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/find.cpp @@ -15,7 +15,7 @@ #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..50a50f7a2a 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,7 +14,7 @@ #include -#include +#include namespace mongocxx { namespace v_noabi { 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..c387e29ea1 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,7 +14,7 @@ #include -#include +#include namespace mongocxx { namespace v_noabi { 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..0da05986ca 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,7 +16,7 @@ #include -#include +#include namespace mongocxx { namespace v_noabi { 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..8a806772a2 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,7 +19,7 @@ #include #include -#include +#include namespace mongocxx { namespace v_noabi { 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..5f877e66b1 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,7 +16,7 @@ #include -#include +#include namespace mongocxx { namespace v_noabi { 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..8ad2603dcc 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/index.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/index.cpp @@ -20,7 +20,7 @@ #include #include -#include +#include namespace mongocxx { namespace v_noabi { 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..4127ab9590 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,7 +18,7 @@ #include -#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..77aab15725 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/insert.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/insert.cpp @@ -14,7 +14,7 @@ #include -#include +#include namespace mongocxx { namespace v_noabi { 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..2df55ce1c5 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/pool.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/pool.cpp @@ -14,7 +14,7 @@ #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/private/apm.hh index b8aed4fc01..5100fd68e0 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/private/apm.hh +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/private/apm.hh @@ -19,7 +19,7 @@ #include #include -#include +#include namespace mongocxx { namespace v_noabi { @@ -169,4 +169,4 @@ inline apm_unique_callbacks make_apm_callbacks(apm const& apm_opts) { } // namespace v_noabi } // namespace mongocxx -#include +#include diff --git a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/private/server_api.hh b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/private/server_api.hh index 9a75b84f26..f75ace5d76 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/private/server_api.hh +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/private/server_api.hh @@ -20,7 +20,7 @@ #include #include -#include +#include namespace mongocxx { namespace v_noabi { @@ -60,4 +60,4 @@ inline unique_server_api make_server_api(server_api const& opts) { } // namespace v_noabi } // namespace mongocxx -#include +#include diff --git a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/private/ssl.hh b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/private/ssl.hh index b4ead06506..21058d4f88 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/private/ssl.hh +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/private/ssl.hh @@ -19,7 +19,7 @@ #include #include -#include +#include namespace mongocxx { namespace v_noabi { @@ -57,4 +57,4 @@ inline std::pair<::mongoc_ssl_opt_t, std::list +#include diff --git a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/private/transaction.hh b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/private/transaction.hh index 3e6c8b89e8..a152fe6825 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/private/transaction.hh +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/private/transaction.hh @@ -23,7 +23,7 @@ #include #include -#include +#include namespace mongocxx { namespace v_noabi { @@ -131,4 +131,4 @@ class transaction::impl { } // namespace v_noabi } // namespace mongocxx -#include +#include 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 e1f9e9d066..83e360f3c0 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/replace.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/replace.cpp @@ -16,7 +16,7 @@ #include -#include +#include namespace mongocxx { namespace v_noabi { 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..6bae1f957b 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 @@ -20,7 +20,7 @@ #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..7693128a3d 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 @@ -21,7 +21,7 @@ #include #include -#include +#include namespace mongocxx { namespace v_noabi { 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..a641fb3259 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/tls.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/tls.cpp @@ -14,7 +14,7 @@ #include -#include +#include namespace mongocxx { namespace v_noabi { 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..13045872c8 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/transaction.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/transaction.cpp @@ -18,7 +18,7 @@ #include #include -#include +#include namespace mongocxx { namespace v_noabi { @@ -91,4 +91,4 @@ transaction::impl& transaction::_get_impl() { } // namespace v_noabi } // namespace mongocxx -#include +#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 6a2259fdda..308bc683e3 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/update.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/update.cpp @@ -17,7 +17,7 @@ #include -#include +#include namespace mongocxx { namespace v_noabi { diff --git a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/pipeline.cpp b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/pipeline.cpp index 474449b290..61701ceeb4 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/pipeline.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/pipeline.cpp @@ -19,7 +19,7 @@ #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..03cd26f968 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/pool.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/pool.cpp @@ -29,7 +29,7 @@ #include #include -#include +#include namespace mongocxx { namespace v_noabi { 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..21737437de 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/read_concern.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/read_concern.cpp @@ -22,7 +22,7 @@ #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..a94a6eb1bd 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/read_preference.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/read_preference.cpp @@ -23,7 +23,7 @@ #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..8b8383976d 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,7 +14,7 @@ #include -#include +#include namespace mongocxx { namespace v_noabi { 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..acba6e8598 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/result/delete.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/result/delete.cpp @@ -14,7 +14,7 @@ #include -#include +#include namespace mongocxx { namespace v_noabi { 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..0fb9042a18 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,7 +16,7 @@ #include -#include +#include namespace mongocxx { namespace v_noabi { 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..1590ecb452 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,7 +16,7 @@ #include -#include +#include namespace mongocxx { namespace v_noabi { 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..fc880db56c 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,7 +16,7 @@ #include -#include +#include namespace mongocxx { namespace v_noabi { 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..f918708670 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,7 +14,7 @@ #include -#include +#include namespace mongocxx { namespace v_noabi { 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..b4b5ce349e 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 @@ -16,7 +16,7 @@ #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..0ba802326e 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/result/update.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/result/update.cpp @@ -14,7 +14,7 @@ #include -#include +#include namespace mongocxx { namespace v_noabi { 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..07bc6d246d 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 @@ -5,7 +5,7 @@ #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..1bffcc060d 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 @@ -5,7 +5,7 @@ #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..47658d9c5b 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/uri.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/uri.cpp @@ -24,7 +24,7 @@ #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..b4b536ef03 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/validation_criteria.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/validation_criteria.cpp @@ -20,7 +20,7 @@ #include -#include +#include namespace { 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..b585572cca 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/write_concern.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/write_concern.cpp @@ -25,7 +25,7 @@ #include #include -#include +#include namespace mongocxx { namespace v_noabi { diff --git a/src/mongocxx/test/catch_helpers.hh b/src/mongocxx/test/catch_helpers.hh index 0bcf1b7f07..6243494a31 100644 --- a/src/mongocxx/test/catch_helpers.hh +++ b/src/mongocxx/test/catch_helpers.hh @@ -17,7 +17,7 @@ #include #include -#include +#include #include @@ -258,4 +258,4 @@ class mongocxx_exception_matcher : public Catch::Matchers::MatcherBase +#include diff --git a/src/mongocxx/test/client.cpp b/src/mongocxx/test/client.cpp index db06bdbae5..e51a73286c 100644 --- a/src/mongocxx/test/client.cpp +++ b/src/mongocxx/test/client.cpp @@ -22,7 +22,7 @@ #include #include -#include +#include #include diff --git a/src/mongocxx/test/client_helpers.cpp b/src/mongocxx/test/client_helpers.cpp index a61ae47e6d..a96ff2d071 100644 --- a/src/mongocxx/test/client_helpers.cpp +++ b/src/mongocxx/test/client_helpers.cpp @@ -39,7 +39,7 @@ #include -#include +#include #include diff --git a/src/mongocxx/test/client_helpers.hh b/src/mongocxx/test/client_helpers.hh index 5b531c47c8..480806ca29 100644 --- a/src/mongocxx/test/client_helpers.hh +++ b/src/mongocxx/test/client_helpers.hh @@ -33,7 +33,7 @@ #include #include -#include +#include #include @@ -250,4 +250,4 @@ std::string getenv_or_fail(const std::string env_name); } // namespace test_util } // namespace mongocxx -#include +#include diff --git a/src/mongocxx/test/pool.cpp b/src/mongocxx/test/pool.cpp index b9cf52630b..552f39875a 100644 --- a/src/mongocxx/test/pool.cpp +++ b/src/mongocxx/test/pool.cpp @@ -22,7 +22,7 @@ #include #include -#include +#include #include diff --git a/src/mongocxx/test/spec/monitoring.cpp b/src/mongocxx/test/spec/monitoring.cpp index 6015d6c1cb..acdbbb65fd 100644 --- a/src/mongocxx/test/spec/monitoring.cpp +++ b/src/mongocxx/test/spec/monitoring.cpp @@ -20,7 +20,7 @@ #include -#include +#include #include #include @@ -357,4 +357,4 @@ void apm_checker::clear() { } // namespace spec } // namespace mongocxx -#include +#include diff --git a/src/mongocxx/test/spec/monitoring.hh b/src/mongocxx/test/spec/monitoring.hh index 0b3888f391..b7a2ece458 100644 --- a/src/mongocxx/test/spec/monitoring.hh +++ b/src/mongocxx/test/spec/monitoring.hh @@ -16,7 +16,7 @@ #include -#include +#include #include #include @@ -88,4 +88,4 @@ class apm_checker { } // namespace spec } // namespace mongocxx -#include +#include diff --git a/src/mongocxx/test/spec/operation.cpp b/src/mongocxx/test/spec/operation.cpp index adb792142a..5a4837182b 100644 --- a/src/mongocxx/test/spec/operation.cpp +++ b/src/mongocxx/test/spec/operation.cpp @@ -41,7 +41,7 @@ #include #include -#include +#include #include @@ -1580,4 +1580,4 @@ document::value operation_runner::run(document::view operation) { } // namespace spec } // namespace mongocxx -#include +#include diff --git a/src/mongocxx/test/spec/operation.hh b/src/mongocxx/test/spec/operation.hh index 6e8bd2d37e..2b906e5353 100644 --- a/src/mongocxx/test/spec/operation.hh +++ b/src/mongocxx/test/spec/operation.hh @@ -24,7 +24,7 @@ #include #include -#include +#include namespace mongocxx { namespace spec { @@ -88,4 +88,4 @@ class operation_runner { } // namespace spec } // namespace mongocxx -#include +#include diff --git a/src/mongocxx/test/spec/unified_tests/assert.hh b/src/mongocxx/test/spec/unified_tests/assert.hh index a3be3294ba..6f4394f42c 100644 --- a/src/mongocxx/test/spec/unified_tests/assert.hh +++ b/src/mongocxx/test/spec/unified_tests/assert.hh @@ -18,7 +18,7 @@ #include -#include +#include namespace mongocxx { namespace assert { @@ -33,4 +33,4 @@ void matches( } // namespace assert } // namespace mongocxx -#include +#include diff --git a/src/mongocxx/test/spec/unified_tests/entity.hh b/src/mongocxx/test/spec/unified_tests/entity.hh index 418f2b26e0..a25a11b6d4 100644 --- a/src/mongocxx/test/spec/unified_tests/entity.hh +++ b/src/mongocxx/test/spec/unified_tests/entity.hh @@ -22,7 +22,7 @@ #include #include -#include +#include namespace mongocxx { namespace entity { @@ -90,4 +90,4 @@ class map { } // namespace entity } // namespace mongocxx -#include +#include diff --git a/src/mongocxx/test/spec/unified_tests/operations.hh b/src/mongocxx/test/spec/unified_tests/operations.hh index 1c088c4215..f39a74b1b5 100644 --- a/src/mongocxx/test/spec/unified_tests/operations.hh +++ b/src/mongocxx/test/spec/unified_tests/operations.hh @@ -22,7 +22,7 @@ #include #include -#include +#include #include @@ -47,4 +47,4 @@ bsoncxx::stdx::optional lookup_read_preference(bsoncxx::documen } // namespace operations } // namespace mongocxx -#include +#include diff --git a/src/mongocxx/test/spec/util.cpp b/src/mongocxx/test/spec/util.cpp index 1ce5989137..3f32c9830f 100644 --- a/src/mongocxx/test/spec/util.cpp +++ b/src/mongocxx/test/spec/util.cpp @@ -41,7 +41,7 @@ #include #include -#include +#include #include @@ -1121,4 +1121,4 @@ void run_crud_tests_in_file(std::string const& test_path, uri test_uri) { } // namespace spec } // namespace mongocxx -#include +#include diff --git a/src/mongocxx/test/spec/util.hh b/src/mongocxx/test/spec/util.hh index 68aa0c8089..c453d3f64e 100644 --- a/src/mongocxx/test/spec/util.hh +++ b/src/mongocxx/test/spec/util.hh @@ -23,7 +23,7 @@ #include #include -#include +#include #include @@ -127,4 +127,4 @@ void run_crud_tests_in_file(std::string const& test_path, uri test_uri = uri{}); } // namespace spec } // namespace mongocxx -#include +#include From 87d2cab0e3f6a49a55169266bea42760b95a2aad Mon Sep 17 00:00:00 2001 From: Ezra Chung Date: Mon, 13 Jan 2025 09:01:54 -0600 Subject: [PATCH 16/19] Revert "Relocate internal components out of v_noabi subdirectories" This reverts commit 9096a3099796b908a398d71a5086b331bda11418. --- .clang-format | 4 +- src/bsoncxx/lib/CMakeLists.txt | 33 ++++---- .../bsoncxx/v_noabi/bsoncxx/array/element.cpp | 2 +- .../bsoncxx/v_noabi/bsoncxx/array/value.cpp | 2 +- .../bsoncxx/v_noabi/bsoncxx/array/view.cpp | 2 +- .../bsoncxx/v_noabi/bsoncxx/builder/core.cpp | 2 +- .../bsoncxx/config/private}/config.hh.in | 0 .../bsoncxx/config/private}/postlude.hh | 0 .../bsoncxx/config/private}/prelude.hh | 2 +- .../bsoncxx/v_noabi/bsoncxx/decimal128.cpp | 2 +- .../v_noabi/bsoncxx/document/element.cpp | 2 +- .../v_noabi/bsoncxx/document/value.cpp | 2 +- .../bsoncxx/v_noabi/bsoncxx/document/view.cpp | 2 +- .../v_noabi/bsoncxx/exception/error_code.cpp | 2 +- .../lib/bsoncxx/v_noabi/bsoncxx/json.cpp | 2 +- .../lib/bsoncxx/v_noabi/bsoncxx/oid.cpp | 2 +- .../{ => v_noabi/bsoncxx}/private/b64_ntop.hh | 0 .../{ => v_noabi/bsoncxx}/private/helpers.hh | 4 +- .../{ => v_noabi/bsoncxx}/private/itoa.cpp | 2 +- .../{ => v_noabi/bsoncxx}/private/itoa.hh | 4 +- .../{ => v_noabi/bsoncxx}/private/libbson.hh | 0 .../bsoncxx}/private/make_unique.hh | 0 .../{ => v_noabi/bsoncxx}/private/stack.hh | 4 +- .../private/suppress_deprecation_warnings.hh | 0 .../v_noabi/bsoncxx/string/view_or_value.cpp | 2 +- .../bsoncxx}/test_util/export_for_testing.hh | 4 +- .../lib/bsoncxx/v_noabi/bsoncxx/types.cpp | 2 +- .../bsoncxx/types/bson_value/private/value.hh | 4 +- .../bsoncxx/types/bson_value/value.cpp | 2 +- .../v_noabi/bsoncxx/types/bson_value/view.cpp | 2 +- .../v_noabi/bsoncxx/types/private/convert.hh | 4 +- .../lib/bsoncxx/v_noabi/bsoncxx/validate.cpp | 2 +- src/bsoncxx/test/catch.hh | 4 +- src/bsoncxx/test/exception_guard.hh | 4 +- src/bsoncxx/test/to_string.hh | 4 +- src/mongocxx/lib/CMakeLists.txt | 75 +++++++++---------- .../mongocxx/v_noabi/mongocxx/bulk_write.cpp | 2 +- .../v_noabi/mongocxx/change_stream.cpp | 2 +- .../lib/mongocxx/v_noabi/mongocxx/client.cpp | 2 +- .../v_noabi/mongocxx/client_encryption.cpp | 2 +- .../v_noabi/mongocxx/client_session.cpp | 2 +- .../mongocxx/v_noabi/mongocxx/collection.cpp | 2 +- .../mongocxx/config/private}/config.hh.in | 0 .../mongocxx/config/private}/postlude.hh | 0 .../mongocxx/config/private}/prelude.hh | 2 +- .../lib/mongocxx/v_noabi/mongocxx/cursor.cpp | 2 +- .../mongocxx/v_noabi/mongocxx/database.cpp | 2 +- .../mongocxx/events/command_failed_event.cpp | 2 +- .../mongocxx/events/command_started_event.cpp | 2 +- .../events/command_succeeded_event.cpp | 2 +- .../events/heartbeat_failed_event.cpp | 2 +- .../events/heartbeat_started_event.cpp | 2 +- .../events/heartbeat_succeeded_event.cpp | 2 +- .../mongocxx/events/server_changed_event.cpp | 2 +- .../mongocxx/events/server_closed_event.cpp | 2 +- .../mongocxx/events/server_description.cpp | 2 +- .../mongocxx/events/server_opening_event.cpp | 2 +- .../events/topology_changed_event.cpp | 2 +- .../mongocxx/events/topology_closed_event.cpp | 2 +- .../mongocxx/events/topology_description.cpp | 2 +- .../events/topology_opening_event.cpp | 2 +- .../v_noabi/mongocxx/exception/error_code.cpp | 2 +- .../exception/operation_exception.cpp | 2 +- .../exception/private/mongoc_error.hh | 4 +- .../mongocxx/exception/server_error_code.cpp | 2 +- .../v_noabi/mongocxx/gridfs/bucket.cpp | 2 +- .../v_noabi/mongocxx/gridfs/downloader.cpp | 2 +- .../v_noabi/mongocxx/gridfs/private/bucket.hh | 4 +- .../mongocxx/gridfs/private/downloader.hh | 4 +- .../mongocxx/gridfs/private/uploader.hh | 4 +- .../v_noabi/mongocxx/gridfs/uploader.cpp | 2 +- .../lib/mongocxx/v_noabi/mongocxx/hint.cpp | 2 +- .../mongocxx/v_noabi/mongocxx/index_model.cpp | 2 +- .../mongocxx/v_noabi/mongocxx/index_view.cpp | 2 +- .../mongocxx/v_noabi/mongocxx/instance.cpp | 2 +- .../lib/mongocxx/v_noabi/mongocxx/logger.cpp | 2 +- .../v_noabi/mongocxx/model/delete_many.cpp | 2 +- .../v_noabi/mongocxx/model/delete_one.cpp | 2 +- .../v_noabi/mongocxx/model/insert_one.cpp | 2 +- .../v_noabi/mongocxx/model/replace_one.cpp | 2 +- .../v_noabi/mongocxx/model/update_many.cpp | 2 +- .../v_noabi/mongocxx/model/update_one.cpp | 2 +- .../mongocxx/v_noabi/mongocxx/model/write.cpp | 2 +- .../v_noabi/mongocxx/options/aggregate.cpp | 2 +- .../mongocxx/v_noabi/mongocxx/options/apm.cpp | 2 +- .../mongocxx/options/auto_encryption.cpp | 2 +- .../v_noabi/mongocxx/options/bulk_write.cpp | 2 +- .../mongocxx/options/change_stream.cpp | 2 +- .../v_noabi/mongocxx/options/client.cpp | 2 +- .../mongocxx/options/client_encryption.cpp | 2 +- .../mongocxx/options/client_session.cpp | 2 +- .../v_noabi/mongocxx/options/count.cpp | 2 +- .../v_noabi/mongocxx/options/delete.cpp | 2 +- .../v_noabi/mongocxx/options/distinct.cpp | 2 +- .../v_noabi/mongocxx/options/encrypt.cpp | 2 +- .../options/estimated_document_count.cpp | 2 +- .../v_noabi/mongocxx/options/find.cpp | 2 +- .../mongocxx/options/find_one_and_delete.cpp | 2 +- .../mongocxx/options/find_one_and_replace.cpp | 2 +- .../mongocxx/options/find_one_and_update.cpp | 2 +- .../mongocxx/options/gridfs/bucket.cpp | 2 +- .../mongocxx/options/gridfs/upload.cpp | 2 +- .../v_noabi/mongocxx/options/index.cpp | 2 +- .../v_noabi/mongocxx/options/index_view.cpp | 2 +- .../v_noabi/mongocxx/options/insert.cpp | 2 +- .../v_noabi/mongocxx/options/pool.cpp | 2 +- .../v_noabi/mongocxx/options/private/apm.hh | 4 +- .../mongocxx/options/private/server_api.hh | 4 +- .../v_noabi/mongocxx/options/private/ssl.hh | 4 +- .../mongocxx/options/private/transaction.hh | 4 +- .../v_noabi/mongocxx/options/replace.cpp | 2 +- .../mongocxx/options/rewrap_many_datakey.cpp | 2 +- .../v_noabi/mongocxx/options/server_api.cpp | 2 +- .../mongocxx/v_noabi/mongocxx/options/tls.cpp | 2 +- .../v_noabi/mongocxx/options/transaction.cpp | 4 +- .../v_noabi/mongocxx/options/update.cpp | 2 +- .../mongocxx/v_noabi/mongocxx/pipeline.cpp | 2 +- .../lib/mongocxx/v_noabi/mongocxx/pool.cpp | 2 +- .../private/append_aggregate_options.hh | 4 +- .../mongocxx}/private/bulk_write.hh | 4 +- .../mongocxx}/private/change_stream.hh | 4 +- .../{ => v_noabi/mongocxx}/private/client.hh | 4 +- .../mongocxx}/private/client_encryption.hh | 4 +- .../mongocxx}/private/client_session.hh | 4 +- .../mongocxx}/private/collection.hh | 4 +- .../mongocxx}/private/conversions.cpp | 2 +- .../mongocxx}/private/conversions.hh | 4 +- .../{ => v_noabi/mongocxx}/private/cursor.hh | 4 +- .../mongocxx}/private/database.hh | 4 +- .../mongocxx}/private/index_view.hh | 4 +- .../mongocxx}/private/libbson.cpp | 2 +- .../{ => v_noabi/mongocxx}/private/libbson.hh | 4 +- .../mongocxx}/private/libmongoc.cpp | 2 +- .../mongocxx}/private/libmongoc.hh | 4 +- .../mongocxx}/private/libmongoc_symbols.hh | 0 .../mongocxx}/private/numeric_casting.cpp | 2 +- .../mongocxx}/private/numeric_casting.hh | 4 +- .../mongocxx}/private/pipeline.hh | 4 +- .../{ => v_noabi/mongocxx}/private/pool.hh | 4 +- .../mongocxx}/private/read_concern.hh | 4 +- .../mongocxx}/private/read_preference.hh | 4 +- .../mongocxx}/private/scoped_bson_value.hh | 0 .../mongocxx}/private/search_index_model.hh | 4 +- .../mongocxx}/private/search_index_view.hh | 4 +- .../{ => v_noabi/mongocxx}/private/uri.hh | 4 +- .../mongocxx}/private/write_concern.hh | 4 +- .../v_noabi/mongocxx/read_concern.cpp | 2 +- .../v_noabi/mongocxx/read_preference.cpp | 2 +- .../v_noabi/mongocxx/result/bulk_write.cpp | 2 +- .../v_noabi/mongocxx/result/delete.cpp | 2 +- .../v_noabi/mongocxx/result/gridfs/upload.cpp | 2 +- .../v_noabi/mongocxx/result/insert_many.cpp | 2 +- .../v_noabi/mongocxx/result/insert_one.cpp | 2 +- .../v_noabi/mongocxx/result/replace_one.cpp | 2 +- .../mongocxx/result/rewrap_many_datakey.cpp | 2 +- .../v_noabi/mongocxx/result/update.cpp | 2 +- .../v_noabi/mongocxx/search_index_model.cpp | 2 +- .../v_noabi/mongocxx/search_index_view.cpp | 2 +- .../mongocxx}/test_util/export_for_testing.hh | 4 +- .../{ => v_noabi/mongocxx}/test_util/mock.hh | 4 +- .../lib/mongocxx/v_noabi/mongocxx/uri.cpp | 2 +- .../v_noabi/mongocxx/validation_criteria.cpp | 2 +- .../v_noabi/mongocxx/write_concern.cpp | 2 +- src/mongocxx/test/catch_helpers.hh | 4 +- src/mongocxx/test/client.cpp | 2 +- src/mongocxx/test/client_helpers.cpp | 2 +- src/mongocxx/test/client_helpers.hh | 4 +- src/mongocxx/test/pool.cpp | 2 +- src/mongocxx/test/spec/monitoring.cpp | 4 +- src/mongocxx/test/spec/monitoring.hh | 4 +- src/mongocxx/test/spec/operation.cpp | 4 +- src/mongocxx/test/spec/operation.hh | 4 +- .../test/spec/unified_tests/assert.hh | 4 +- .../test/spec/unified_tests/entity.hh | 4 +- .../test/spec/unified_tests/operations.hh | 4 +- src/mongocxx/test/spec/util.cpp | 4 +- src/mongocxx/test/spec/util.hh | 4 +- 177 files changed, 268 insertions(+), 278 deletions(-) rename src/bsoncxx/lib/bsoncxx/{private/config => v_noabi/bsoncxx/config/private}/config.hh.in (100%) rename src/bsoncxx/lib/bsoncxx/{private/config => v_noabi/bsoncxx/config/private}/postlude.hh (100%) rename src/bsoncxx/lib/bsoncxx/{private/config => v_noabi/bsoncxx/config/private}/prelude.hh (94%) rename src/bsoncxx/lib/bsoncxx/{ => v_noabi/bsoncxx}/private/b64_ntop.hh (100%) rename src/bsoncxx/lib/bsoncxx/{ => v_noabi/bsoncxx}/private/helpers.hh (94%) rename src/bsoncxx/lib/bsoncxx/{ => v_noabi/bsoncxx}/private/itoa.cpp (99%) rename src/bsoncxx/lib/bsoncxx/{ => v_noabi/bsoncxx}/private/itoa.hh (93%) rename src/bsoncxx/lib/bsoncxx/{ => v_noabi/bsoncxx}/private/libbson.hh (100%) rename src/bsoncxx/lib/bsoncxx/{ => v_noabi/bsoncxx}/private/make_unique.hh (100%) rename src/bsoncxx/lib/bsoncxx/{ => v_noabi/bsoncxx}/private/stack.hh (98%) rename src/bsoncxx/lib/bsoncxx/{ => v_noabi/bsoncxx}/private/suppress_deprecation_warnings.hh (100%) rename src/bsoncxx/lib/bsoncxx/{ => v_noabi/bsoncxx}/test_util/export_for_testing.hh (92%) rename src/mongocxx/lib/mongocxx/{private/config => v_noabi/mongocxx/config/private}/config.hh.in (100%) rename src/mongocxx/lib/mongocxx/{private/config => v_noabi/mongocxx/config/private}/postlude.hh (100%) rename src/mongocxx/lib/mongocxx/{private/config => v_noabi/mongocxx/config/private}/prelude.hh (95%) rename src/mongocxx/lib/mongocxx/{ => v_noabi/mongocxx}/private/append_aggregate_options.hh (94%) rename src/mongocxx/lib/mongocxx/{ => v_noabi/mongocxx}/private/bulk_write.hh (92%) rename src/mongocxx/lib/mongocxx/{ => v_noabi/mongocxx}/private/change_stream.hh (97%) rename src/mongocxx/lib/mongocxx/{ => v_noabi/mongocxx}/private/client.hh (93%) rename src/mongocxx/lib/mongocxx/{ => v_noabi/mongocxx}/private/client_encryption.hh (99%) rename src/mongocxx/lib/mongocxx/{ => v_noabi/mongocxx}/private/client_session.hh (98%) rename src/mongocxx/lib/mongocxx/{ => v_noabi/mongocxx}/private/collection.hh (95%) rename src/mongocxx/lib/mongocxx/{ => v_noabi/mongocxx}/private/conversions.cpp (97%) rename src/mongocxx/lib/mongocxx/{ => v_noabi/mongocxx}/private/conversions.hh (92%) rename src/mongocxx/lib/mongocxx/{ => v_noabi/mongocxx}/private/cursor.hh (96%) rename src/mongocxx/lib/mongocxx/{ => v_noabi/mongocxx}/private/database.hh (94%) rename src/mongocxx/lib/mongocxx/{ => v_noabi/mongocxx}/private/index_view.hh (99%) rename src/mongocxx/lib/mongocxx/{ => v_noabi/mongocxx}/private/libbson.cpp (98%) rename src/mongocxx/lib/mongocxx/{ => v_noabi/mongocxx}/private/libbson.hh (98%) rename src/mongocxx/lib/mongocxx/{ => v_noabi/mongocxx}/private/libmongoc.cpp (96%) rename src/mongocxx/lib/mongocxx/{ => v_noabi/mongocxx}/private/libmongoc.hh (96%) rename src/mongocxx/lib/mongocxx/{ => v_noabi/mongocxx}/private/libmongoc_symbols.hh (100%) rename src/mongocxx/lib/mongocxx/{ => v_noabi/mongocxx}/private/numeric_casting.cpp (97%) rename src/mongocxx/lib/mongocxx/{ => v_noabi/mongocxx}/private/numeric_casting.hh (95%) rename src/mongocxx/lib/mongocxx/{ => v_noabi/mongocxx}/private/pipeline.hh (92%) rename src/mongocxx/lib/mongocxx/{ => v_noabi/mongocxx}/private/pool.hh (93%) rename src/mongocxx/lib/mongocxx/{ => v_noabi/mongocxx}/private/read_concern.hh (92%) rename src/mongocxx/lib/mongocxx/{ => v_noabi/mongocxx}/private/read_preference.hh (92%) rename src/mongocxx/lib/mongocxx/{ => v_noabi/mongocxx}/private/scoped_bson_value.hh (100%) rename src/mongocxx/lib/mongocxx/{ => v_noabi/mongocxx}/private/search_index_model.hh (88%) rename src/mongocxx/lib/mongocxx/{ => v_noabi/mongocxx}/private/search_index_view.hh (98%) rename src/mongocxx/lib/mongocxx/{ => v_noabi/mongocxx}/private/uri.hh (92%) rename src/mongocxx/lib/mongocxx/{ => v_noabi/mongocxx}/private/write_concern.hh (92%) rename src/mongocxx/lib/mongocxx/{ => v_noabi/mongocxx}/test_util/export_for_testing.hh (91%) rename src/mongocxx/lib/mongocxx/{ => v_noabi/mongocxx}/test_util/mock.hh (98%) diff --git a/.clang-format b/.clang-format index 1c8e6c6bdb..e75951136a 100644 --- a/.clang-format +++ b/.clang-format @@ -164,9 +164,9 @@ IncludeCategories: Priority: 28 - Regex: 'mongocxx/v1/.*\.hh' # v1 private headers Priority: 29 - - Regex: 'bsoncxx/(private/)?config/prelude\.(hpp|hh)' # v_noabi preludes + - Regex: 'bsoncxx/config(/private)?/prelude\.(hpp|hh)' # v_noabi preludes Priority: 60 - - Regex: 'mongocxx/(private/)?config/prelude\.(hpp|hh)' # v_noabi preludes + - Regex: 'mongocxx/config(/private)?/prelude\.(hpp|hh)' # v_noabi preludes Priority: 61 - Regex: 'bsoncxx/test/.*' # test headers Priority: 70 diff --git a/src/bsoncxx/lib/CMakeLists.txt b/src/bsoncxx/lib/CMakeLists.txt index c5a6930cae..4103e8c825 100644 --- a/src/bsoncxx/lib/CMakeLists.txt +++ b/src/bsoncxx/lib/CMakeLists.txt @@ -12,10 +12,6 @@ # 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 @@ -32,6 +28,7 @@ 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 @@ -48,7 +45,6 @@ set(bsoncxx_sources_v1 ) list(APPEND bsoncxx_sources - ${bsoncxx_sources_private} ${bsoncxx_sources_v_noabi} ${bsoncxx_sources_v1} ) @@ -58,8 +54,8 @@ set(bsoncxx_sources "${bsoncxx_sources}" PARENT_SCOPE) # Generate private headers. if(1) configure_file( - bsoncxx/private/config/config.hh.in - bsoncxx/private/config/config.hh + bsoncxx/v_noabi/bsoncxx/config/private/config.hh.in + bsoncxx/v_noabi/bsoncxx/config/private/config.hh ) endif() @@ -85,20 +81,19 @@ endif() set_dist_list(src_bsoncxx_lib_DIST CMakeLists.txt - ${bsoncxx_sources_private} ${bsoncxx_sources_v_noabi} ${bsoncxx_sources_v1} - bsoncxx/private/b64_ntop.hh - bsoncxx/private/config/config.hh.in - bsoncxx/private/config/postlude.hh - bsoncxx/private/config/prelude.hh - bsoncxx/private/helpers.hh - bsoncxx/private/itoa.hh - bsoncxx/private/libbson.hh - bsoncxx/private/make_unique.hh - bsoncxx/private/stack.hh - bsoncxx/private/suppress_deprecation_warnings.hh - bsoncxx/test_util/export_for_testing.hh + 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/v1/config/config.hpp.in 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 4a071bc3da..84e200c8b9 100644 --- a/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/array/element.cpp +++ b/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/array/element.cpp @@ -17,7 +17,7 @@ #include #include -#include +#include namespace bsoncxx { namespace v_noabi { 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 57f20ecaf5..59a1fd65f1 100644 --- a/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/array/value.cpp +++ b/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/array/value.cpp @@ -16,7 +16,7 @@ #include -#include +#include namespace bsoncxx { namespace v_noabi { 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 eb1348b10f..fc31a76c7e 100644 --- a/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/array/view.cpp +++ b/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/array/view.cpp @@ -21,7 +21,7 @@ #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 a5938e0985..7cc4931c59 100644 --- a/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/builder/core.cpp +++ b/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/builder/core.cpp @@ -27,7 +27,7 @@ #include #include -#include +#include namespace bsoncxx { namespace v_noabi { diff --git a/src/bsoncxx/lib/bsoncxx/private/config/config.hh.in b/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/config/private/config.hh.in similarity index 100% rename from src/bsoncxx/lib/bsoncxx/private/config/config.hh.in rename to src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/config/private/config.hh.in diff --git a/src/bsoncxx/lib/bsoncxx/private/config/postlude.hh b/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/config/private/postlude.hh similarity index 100% rename from src/bsoncxx/lib/bsoncxx/private/config/postlude.hh rename to src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/config/private/postlude.hh diff --git a/src/bsoncxx/lib/bsoncxx/private/config/prelude.hh b/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/config/private/prelude.hh similarity index 94% rename from src/bsoncxx/lib/bsoncxx/private/config/prelude.hh rename to src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/config/private/prelude.hh index bae02463d1..2121524065 100644 --- a/src/bsoncxx/lib/bsoncxx/private/config/prelude.hh +++ b/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/config/private/prelude.hh @@ -17,4 +17,4 @@ // NOTE: Push any macros here that are defined by the following // headers here. -#include +#include diff --git a/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/decimal128.cpp b/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/decimal128.cpp index 7ad4c977aa..a710ccc280 100644 --- a/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/decimal128.cpp +++ b/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/decimal128.cpp @@ -19,7 +19,7 @@ #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 a1e744bb0c..bc497e2919 100644 --- a/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/document/element.cpp +++ b/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/document/element.cpp @@ -24,7 +24,7 @@ #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 d8873b1853..b5b636b8c5 100644 --- a/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/document/value.cpp +++ b/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/document/value.cpp @@ -16,7 +16,7 @@ #include -#include +#include namespace bsoncxx { namespace v_noabi { 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 05f1169ed4..8ae1b190a2 100644 --- a/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/document/view.cpp +++ b/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/document/view.cpp @@ -19,7 +19,7 @@ #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 4d7904bda3..62943a0a9e 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,7 +16,7 @@ #include -#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 f7079f73b2..8393de1bac 100644 --- a/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/json.cpp +++ b/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/json.cpp @@ -25,7 +25,7 @@ #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 955298bd5c..cf14c3ee2c 100644 --- a/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/oid.cpp +++ b/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/oid.cpp @@ -19,7 +19,7 @@ #include #include -#include +#include namespace bsoncxx { namespace v_noabi { diff --git a/src/bsoncxx/lib/bsoncxx/private/b64_ntop.hh b/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/private/b64_ntop.hh similarity index 100% rename from src/bsoncxx/lib/bsoncxx/private/b64_ntop.hh rename to src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/private/b64_ntop.hh diff --git a/src/bsoncxx/lib/bsoncxx/private/helpers.hh b/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/private/helpers.hh similarity index 94% rename from src/bsoncxx/lib/bsoncxx/private/helpers.hh rename to src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/private/helpers.hh index adf9be842e..32d887d303 100644 --- a/src/bsoncxx/lib/bsoncxx/private/helpers.hh +++ b/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/private/helpers.hh @@ -19,7 +19,7 @@ #include #include -#include +#include namespace bsoncxx { namespace helpers { @@ -48,4 +48,4 @@ inline bsoncxx::v_noabi::oid make_oid(bson_oid_t const* bson_oid) { } // namespace helpers } // namespace bsoncxx -#include +#include diff --git a/src/bsoncxx/lib/bsoncxx/private/itoa.cpp b/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/private/itoa.cpp similarity index 99% rename from src/bsoncxx/lib/bsoncxx/private/itoa.cpp rename to src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/private/itoa.cpp index e0033ade82..85c540854b 100644 --- a/src/bsoncxx/lib/bsoncxx/private/itoa.cpp +++ b/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/private/itoa.cpp @@ -14,7 +14,7 @@ #include -#include +#include namespace bsoncxx { diff --git a/src/bsoncxx/lib/bsoncxx/private/itoa.hh b/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/private/itoa.hh similarity index 93% rename from src/bsoncxx/lib/bsoncxx/private/itoa.hh rename to src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/private/itoa.hh index 43fc24d67d..af23dea484 100644 --- a/src/bsoncxx/lib/bsoncxx/private/itoa.hh +++ b/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/private/itoa.hh @@ -19,7 +19,7 @@ #include -#include +#include namespace bsoncxx { @@ -60,4 +60,4 @@ class itoa { } // namespace bsoncxx -#include +#include diff --git a/src/bsoncxx/lib/bsoncxx/private/libbson.hh b/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/private/libbson.hh similarity index 100% rename from src/bsoncxx/lib/bsoncxx/private/libbson.hh rename to src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/private/libbson.hh diff --git a/src/bsoncxx/lib/bsoncxx/private/make_unique.hh b/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/private/make_unique.hh similarity index 100% rename from src/bsoncxx/lib/bsoncxx/private/make_unique.hh rename to src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/private/make_unique.hh diff --git a/src/bsoncxx/lib/bsoncxx/private/stack.hh b/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/private/stack.hh similarity index 98% rename from src/bsoncxx/lib/bsoncxx/private/stack.hh rename to src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/private/stack.hh index b261e19b8d..173edaf6d2 100644 --- a/src/bsoncxx/lib/bsoncxx/private/stack.hh +++ b/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/private/stack.hh @@ -18,7 +18,7 @@ #include #include -#include +#include namespace bsoncxx { @@ -162,4 +162,4 @@ class stack { } // namespace bsoncxx -#include +#include diff --git a/src/bsoncxx/lib/bsoncxx/private/suppress_deprecation_warnings.hh b/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/private/suppress_deprecation_warnings.hh similarity index 100% rename from src/bsoncxx/lib/bsoncxx/private/suppress_deprecation_warnings.hh rename to src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/private/suppress_deprecation_warnings.hh 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 cc4a6e3034..d01972dafa 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,7 +15,7 @@ #include #include -#include +#include namespace bsoncxx { namespace v_noabi { diff --git a/src/bsoncxx/lib/bsoncxx/test_util/export_for_testing.hh b/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/test_util/export_for_testing.hh similarity index 92% rename from src/bsoncxx/lib/bsoncxx/test_util/export_for_testing.hh rename to src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/test_util/export_for_testing.hh index bd75d3e024..daeda50ae9 100644 --- a/src/bsoncxx/lib/bsoncxx/test_util/export_for_testing.hh +++ b/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/test_util/export_for_testing.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 @@ -29,4 +29,4 @@ #define BSONCXX_ABI_EXPORT_CDECL_TESTING(...) __VA_ARGS__ #endif -#include +#include diff --git a/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/types.cpp b/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/types.cpp index 54b3b6b501..76e8ae0348 100644 --- a/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/types.cpp +++ b/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/types.cpp @@ -14,7 +14,7 @@ #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/private/value.hh index 2932f42d7d..0c7d34d6ab 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/private/value.hh @@ -18,7 +18,7 @@ #include #include -#include +#include namespace bsoncxx { namespace v_noabi { @@ -65,4 +65,4 @@ inline bson_value::value make_owning_bson(void* internal_value) { } // namespace v_noabi } // namespace bsoncxx -#include +#include 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 141a1c67ab..c673065068 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 @@ -19,7 +19,7 @@ #include #include -#include +#include namespace bsoncxx { namespace v_noabi { 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 b9e9a3d90e..27ae875239 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 @@ -21,7 +21,7 @@ #include #include -#include +#include #define BSONCXX_CITER \ bson_iter_t iter; \ diff --git a/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/types/private/convert.hh b/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/types/private/convert.hh index a868403f8f..8d8b38a96a 100644 --- a/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/types/private/convert.hh +++ b/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/types/private/convert.hh @@ -21,7 +21,7 @@ #include #include -#include +#include namespace bsoncxx { namespace v_noabi { @@ -327,4 +327,4 @@ inline void convert_from_libbson(bson_value_t const* v, b_array* out) { } // namespace v_noabi } // namespace bsoncxx -#include +#include diff --git a/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/validate.cpp b/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/validate.cpp index 491624d735..51a38f768d 100644 --- a/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/validate.cpp +++ b/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/validate.cpp @@ -16,7 +16,7 @@ #include #include -#include +#include namespace bsoncxx { namespace v_noabi { diff --git a/src/bsoncxx/test/catch.hh b/src/bsoncxx/test/catch.hh index 2ebd064c63..aef7695024 100644 --- a/src/bsoncxx/test/catch.hh +++ b/src/bsoncxx/test/catch.hh @@ -20,7 +20,7 @@ #include #include -#include +#include #include @@ -149,4 +149,4 @@ struct StringMaker { } // namespace Catch -#include +#include diff --git a/src/bsoncxx/test/exception_guard.hh b/src/bsoncxx/test/exception_guard.hh index f922413c73..3fdfa14f80 100644 --- a/src/bsoncxx/test/exception_guard.hh +++ b/src/bsoncxx/test/exception_guard.hh @@ -23,7 +23,7 @@ #include -#include +#include #include @@ -102,4 +102,4 @@ struct exception_guard_state { } // namespace test } // namespace bsoncxx -#include +#include diff --git a/src/bsoncxx/test/to_string.hh b/src/bsoncxx/test/to_string.hh index eb600ce7d3..18da14f8ff 100644 --- a/src/bsoncxx/test/to_string.hh +++ b/src/bsoncxx/test/to_string.hh @@ -26,7 +26,7 @@ #include #include -#include +#include namespace bsoncxx { @@ -93,4 +93,4 @@ inline std::string to_string(bsoncxx::v_noabi::types::bson_value::view_or_value } // namespace bsoncxx -#include +#include diff --git a/src/mongocxx/lib/CMakeLists.txt b/src/mongocxx/lib/CMakeLists.txt index 180404c031..0a4fb40d9e 100644 --- a/src/mongocxx/lib/CMakeLists.txt +++ b/src/mongocxx/lib/CMakeLists.txt @@ -12,13 +12,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -set(mongocxx_sources_private - mongocxx/private/conversions.cpp - mongocxx/private/libbson.cpp - mongocxx/private/libmongoc.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 @@ -103,6 +96,10 @@ 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 @@ -129,7 +126,6 @@ set(mongocxx_sources_v1 ) list(APPEND mongocxx_sources - ${mongocxx_sources_private} ${mongocxx_sources_v_noabi} ${mongocxx_sources_v1} ) @@ -151,8 +147,8 @@ if(1) endif() configure_file( - mongocxx/private/config/config.hh.in - mongocxx/private/config/config.hh + mongocxx/v_noabi/mongocxx/config/private/config.hh.in + mongocxx/v_noabi/mongocxx/config/private/config.hh ) endif() @@ -178,38 +174,11 @@ endif() set_dist_list(src_mongocxx_lib_DIST CMakeLists.txt - ${mongocxx_sources_private} ${mongocxx_sources_v_noabi} ${mongocxx_sources_v1} - mongocxx/private/append_aggregate_options.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/config/postlude.hh - mongocxx/private/config/prelude.hh - mongocxx/private/conversions.hh - mongocxx/private/cursor.hh - mongocxx/private/database.hh - mongocxx/private/index_view.hh - mongocxx/private/libbson.hh - mongocxx/private/libmongoc_symbols.hh - mongocxx/private/libmongoc.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/test_util/export_for_testing.hh - mongocxx/test_util/mock.hh + 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 @@ -218,6 +187,32 @@ set_dist_list(src_mongocxx_lib_DIST 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/v1/config/config.hpp.in mongocxx/v1/config/version.hpp.in ) 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 2adac9da83..ba146d48ba 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/bulk_write.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/bulk_write.cpp @@ -28,7 +28,7 @@ #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 0f4ce64a5a..611b05d60a 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/change_stream.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/change_stream.cpp @@ -20,7 +20,7 @@ #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 babf7fbb3a..adad108180 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/client.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/client.cpp @@ -33,7 +33,7 @@ #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 e07f88645c..796f2cf7af 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/client_encryption.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/client_encryption.cpp @@ -18,7 +18,7 @@ #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 a6aaee4c40..e127ceb648 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/client_session.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/client_session.cpp @@ -19,7 +19,7 @@ #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 c35b87826c..506ae2878a 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/collection.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/collection.cpp @@ -58,7 +58,7 @@ #include #include -#include +#include using bsoncxx::v_noabi::builder::concatenate; using bsoncxx::v_noabi::builder::basic::kvp; diff --git a/src/mongocxx/lib/mongocxx/private/config/config.hh.in b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/config/private/config.hh.in similarity index 100% rename from src/mongocxx/lib/mongocxx/private/config/config.hh.in rename to src/mongocxx/lib/mongocxx/v_noabi/mongocxx/config/private/config.hh.in diff --git a/src/mongocxx/lib/mongocxx/private/config/postlude.hh b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/config/private/postlude.hh similarity index 100% rename from src/mongocxx/lib/mongocxx/private/config/postlude.hh rename to src/mongocxx/lib/mongocxx/v_noabi/mongocxx/config/private/postlude.hh diff --git a/src/mongocxx/lib/mongocxx/private/config/prelude.hh b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/config/private/prelude.hh similarity index 95% rename from src/mongocxx/lib/mongocxx/private/config/prelude.hh rename to src/mongocxx/lib/mongocxx/v_noabi/mongocxx/config/private/prelude.hh index 0cddf0e046..d01e52a4fa 100644 --- a/src/mongocxx/lib/mongocxx/private/config/prelude.hh +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/config/private/prelude.hh @@ -25,4 +25,4 @@ #pragma push_macro("MONGOCXX_COMPILER_VERSION") #undef MONGOCXX_COMPILER_VERSION -#include +#include diff --git a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/cursor.cpp b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/cursor.cpp index 4faaa7819a..599b2dd203 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/cursor.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/cursor.cpp @@ -21,7 +21,7 @@ #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 2cba5b3966..6f0997ed5b 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/database.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/database.cpp @@ -35,7 +35,7 @@ #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/events/command_failed_event.cpp b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/events/command_failed_event.cpp index 370bda1c82..8996192c80 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 @@ -21,7 +21,7 @@ #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 0100989410..e9b7900ecf 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 @@ -18,7 +18,7 @@ #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 227a8f4005..965c532fa3 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 @@ -18,7 +18,7 @@ #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 b15aa09547..110d7b6301 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 @@ -15,7 +15,7 @@ #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 bfc4b857fb..a19d348690 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 @@ -15,7 +15,7 @@ #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 d50cc634af..e8728fed05 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 @@ -15,7 +15,7 @@ #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 f959888439..3729355f8e 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 @@ -15,7 +15,7 @@ #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 a32e58d562..814381b9dc 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 @@ -15,7 +15,7 @@ #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 8fd4c4d4dd..3e8120d13d 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 @@ -15,7 +15,7 @@ #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 7f23feaa32..5e97cf7d51 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 @@ -15,7 +15,7 @@ #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 297cbbec43..03c1072d44 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 @@ -15,7 +15,7 @@ #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 e071c98448..73d73254c7 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 @@ -15,7 +15,7 @@ #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 c293bc70d0..f47b1d7e07 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 @@ -16,7 +16,7 @@ #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 af40e42302..6daededbac 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 @@ -15,7 +15,7 @@ #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 a77b57418d..3a657d74d3 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,7 +16,7 @@ #include -#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 afb30a0375..02d59c4f8d 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 @@ -21,7 +21,7 @@ #include #include -#include +#include namespace mongocxx { namespace v_noabi { diff --git a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/exception/private/mongoc_error.hh b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/exception/private/mongoc_error.hh index 9da77f7d69..86d3263204 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/exception/private/mongoc_error.hh +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/exception/private/mongoc_error.hh @@ -20,7 +20,7 @@ #include #include -#include +#include namespace mongocxx { namespace v_noabi { @@ -65,4 +65,4 @@ void throw_exception(bsoncxx::v_noabi::document::value raw_server_error, ::bson_ } // namespace v_noabi } // namespace mongocxx -#include +#include 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 6e8baa63bf..0157369eb0 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,7 +16,7 @@ #include -#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 022583a4e9..a59a44f9f0 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/gridfs/bucket.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/gridfs/bucket.cpp @@ -34,7 +34,7 @@ #include #include -#include +#include namespace mongocxx { namespace v_noabi { 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 618ab3849e..f771c9533e 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/gridfs/downloader.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/gridfs/downloader.cpp @@ -26,7 +26,7 @@ #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/private/bucket.hh index 531babd964..5910a47f76 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/gridfs/private/bucket.hh +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/gridfs/private/bucket.hh @@ -20,7 +20,7 @@ #include #include -#include +#include namespace mongocxx { namespace v_noabi { @@ -55,4 +55,4 @@ class bucket::impl { } // namespace v_noabi } // namespace mongocxx -#include +#include diff --git a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/gridfs/private/downloader.hh b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/gridfs/private/downloader.hh index 0e856a980b..01959bb3b4 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/gridfs/private/downloader.hh +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/gridfs/private/downloader.hh @@ -21,7 +21,7 @@ #include #include -#include +#include namespace mongocxx { namespace v_noabi { @@ -117,4 +117,4 @@ class downloader::impl { } // namespace v_noabi } // namespace mongocxx -#include +#include diff --git a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/gridfs/private/uploader.hh b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/gridfs/private/uploader.hh index 43e370129f..b29a09f1e2 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/gridfs/private/uploader.hh +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/gridfs/private/uploader.hh @@ -22,7 +22,7 @@ #include -#include +#include namespace mongocxx { namespace v_noabi { @@ -91,4 +91,4 @@ class uploader::impl { } // namespace v_noabi } // namespace mongocxx -#include +#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 658f8b9df6..d8127033c6 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/gridfs/uploader.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/gridfs/uploader.cpp @@ -27,7 +27,7 @@ #include #include -#include +#include namespace { diff --git a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/hint.cpp b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/hint.cpp index 67fca5358d..2aac5c6013 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/hint.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/hint.cpp @@ -18,7 +18,7 @@ #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/index_model.cpp b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/index_model.cpp index b899925e22..75e4a65f80 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/index_model.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/index_model.cpp @@ -14,7 +14,7 @@ #include -#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 2654dcf1e0..31d91f53af 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/index_view.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/index_view.cpp @@ -21,7 +21,7 @@ #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 c07dda6d77..233a11699a 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/instance.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/instance.cpp @@ -27,7 +27,7 @@ #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 715d243ffd..c6fab67c06 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/logger.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/logger.cpp @@ -14,7 +14,7 @@ #include -#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 d719fbb624..c28a0df4e2 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,7 +14,7 @@ #include -#include +#include namespace mongocxx { namespace v_noabi { 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 d969e8b6e8..464c2438cd 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,7 +14,7 @@ #include -#include +#include namespace mongocxx { namespace v_noabi { 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 dcc2c849d8..8f52f8d406 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,7 +14,7 @@ #include -#include +#include namespace mongocxx { namespace v_noabi { 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 3b2b99b02a..5f3dbe79ba 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,7 +14,7 @@ #include -#include +#include namespace mongocxx { namespace v_noabi { 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 51fc548670..32d612ca0a 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,7 +16,7 @@ #include -#include +#include namespace mongocxx { namespace v_noabi { 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 4e9f9af855..30a6d72564 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,7 +16,7 @@ #include -#include +#include namespace mongocxx { namespace v_noabi { 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 b4dbee3e14..b8ec8d3247 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/model/write.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/model/write.cpp @@ -16,7 +16,7 @@ #include -#include +#include namespace mongocxx { namespace v_noabi { 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 f435bd0cb4..4eaa0fa53f 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/aggregate.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/aggregate.cpp @@ -18,7 +18,7 @@ #include #include -#include +#include namespace mongocxx { namespace v_noabi { 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 33bbe96257..d618ae9aa7 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,7 @@ #include -#include +#include namespace mongocxx { namespace v_noabi { 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 d5f7182d69..06f4c9e8c8 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 @@ -22,7 +22,7 @@ #include #include -#include +#include namespace mongocxx { namespace v_noabi { 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 6f46732a53..54c35e23af 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,7 +14,7 @@ #include -#include +#include namespace mongocxx { namespace v_noabi { 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 2eb65f5710..6bcc666ce3 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,7 +22,7 @@ #include #include -#include +#include namespace mongocxx { namespace v_noabi { 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 517b3ebe82..51060e0fa7 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/client.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/client.cpp @@ -14,7 +14,7 @@ #include -#include +#include namespace mongocxx { namespace v_noabi { 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 3045a4072b..b6d0c62385 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 @@ -18,7 +18,7 @@ #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 9065fff6f1..8837cfdc2c 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,7 +14,7 @@ #include -#include +#include namespace mongocxx { namespace v_noabi { 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 a8809e1f72..214fa2e4da 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/count.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/count.cpp @@ -15,7 +15,7 @@ #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 6a2d068c1a..b2bc4220fd 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/delete.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/delete.cpp @@ -15,7 +15,7 @@ #include #include -#include +#include namespace mongocxx { namespace v_noabi { 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 1fb6abcd77..c25eadb10d 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/distinct.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/distinct.cpp @@ -15,7 +15,7 @@ #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 d18f8355d0..9fe5d4ec0f 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/encrypt.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/encrypt.cpp @@ -23,7 +23,7 @@ #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 8498c4771a..8b6953e73f 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 @@ -15,7 +15,7 @@ #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 542639b8f5..c1c1a1e038 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/find.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/find.cpp @@ -15,7 +15,7 @@ #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 50a50f7a2a..33348d0edb 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,7 +14,7 @@ #include -#include +#include namespace mongocxx { namespace v_noabi { 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 c387e29ea1..12d2e58232 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,7 +14,7 @@ #include -#include +#include namespace mongocxx { namespace v_noabi { 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 0da05986ca..a6f0e1e182 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,7 +16,7 @@ #include -#include +#include namespace mongocxx { namespace v_noabi { 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 8a806772a2..23f586cd52 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,7 +19,7 @@ #include #include -#include +#include namespace mongocxx { namespace v_noabi { 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 5f877e66b1..44193053b9 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,7 +16,7 @@ #include -#include +#include namespace mongocxx { namespace v_noabi { 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 8ad2603dcc..646a4b7bc2 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/index.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/index.cpp @@ -20,7 +20,7 @@ #include #include -#include +#include namespace mongocxx { namespace v_noabi { 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 4127ab9590..a69a00add7 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,7 +18,7 @@ #include -#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 77aab15725..5dab1b323f 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/insert.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/insert.cpp @@ -14,7 +14,7 @@ #include -#include +#include namespace mongocxx { namespace v_noabi { 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 2df55ce1c5..eb5ab5ddc6 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/pool.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/pool.cpp @@ -14,7 +14,7 @@ #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/private/apm.hh index 5100fd68e0..b8aed4fc01 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/private/apm.hh +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/private/apm.hh @@ -19,7 +19,7 @@ #include #include -#include +#include namespace mongocxx { namespace v_noabi { @@ -169,4 +169,4 @@ inline apm_unique_callbacks make_apm_callbacks(apm const& apm_opts) { } // namespace v_noabi } // namespace mongocxx -#include +#include diff --git a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/private/server_api.hh b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/private/server_api.hh index f75ace5d76..9a75b84f26 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/private/server_api.hh +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/private/server_api.hh @@ -20,7 +20,7 @@ #include #include -#include +#include namespace mongocxx { namespace v_noabi { @@ -60,4 +60,4 @@ inline unique_server_api make_server_api(server_api const& opts) { } // namespace v_noabi } // namespace mongocxx -#include +#include diff --git a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/private/ssl.hh b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/private/ssl.hh index 21058d4f88..b4ead06506 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/private/ssl.hh +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/private/ssl.hh @@ -19,7 +19,7 @@ #include #include -#include +#include namespace mongocxx { namespace v_noabi { @@ -57,4 +57,4 @@ inline std::pair<::mongoc_ssl_opt_t, std::list +#include diff --git a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/private/transaction.hh b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/private/transaction.hh index a152fe6825..3e6c8b89e8 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/private/transaction.hh +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/private/transaction.hh @@ -23,7 +23,7 @@ #include #include -#include +#include namespace mongocxx { namespace v_noabi { @@ -131,4 +131,4 @@ class transaction::impl { } // namespace v_noabi } // namespace mongocxx -#include +#include 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 83e360f3c0..e1f9e9d066 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/replace.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/replace.cpp @@ -16,7 +16,7 @@ #include -#include +#include namespace mongocxx { namespace v_noabi { 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 6bae1f957b..de474b7ed3 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 @@ -20,7 +20,7 @@ #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 7693128a3d..c0f4a5991b 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 @@ -21,7 +21,7 @@ #include #include -#include +#include namespace mongocxx { namespace v_noabi { 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 a641fb3259..9eefbdc7bb 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/tls.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/tls.cpp @@ -14,7 +14,7 @@ #include -#include +#include namespace mongocxx { namespace v_noabi { 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 13045872c8..bbca2812a5 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/transaction.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/transaction.cpp @@ -18,7 +18,7 @@ #include #include -#include +#include namespace mongocxx { namespace v_noabi { @@ -91,4 +91,4 @@ transaction::impl& transaction::_get_impl() { } // namespace v_noabi } // namespace mongocxx -#include +#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 308bc683e3..6a2259fdda 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/update.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/options/update.cpp @@ -17,7 +17,7 @@ #include -#include +#include namespace mongocxx { namespace v_noabi { diff --git a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/pipeline.cpp b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/pipeline.cpp index 61701ceeb4..474449b290 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/pipeline.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/pipeline.cpp @@ -19,7 +19,7 @@ #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 03cd26f968..ed14353654 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/pool.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/pool.cpp @@ -29,7 +29,7 @@ #include #include -#include +#include namespace mongocxx { namespace v_noabi { diff --git a/src/mongocxx/lib/mongocxx/private/append_aggregate_options.hh b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/append_aggregate_options.hh similarity index 94% rename from src/mongocxx/lib/mongocxx/private/append_aggregate_options.hh rename to src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/append_aggregate_options.hh index a1dbb54108..406382909c 100644 --- a/src/mongocxx/lib/mongocxx/private/append_aggregate_options.hh +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/append_aggregate_options.hh @@ -4,7 +4,7 @@ #include -#include +#include namespace mongocxx { namespace v_noabi { @@ -57,4 +57,4 @@ inline void append_aggregate_options( } // namespace v_noabi } // namespace mongocxx -#include +#include diff --git a/src/mongocxx/lib/mongocxx/private/bulk_write.hh b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/bulk_write.hh similarity index 92% rename from src/mongocxx/lib/mongocxx/private/bulk_write.hh rename to src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/bulk_write.hh index 7b1c06e580..0fce635f90 100644 --- a/src/mongocxx/lib/mongocxx/private/bulk_write.hh +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/bulk_write.hh @@ -17,7 +17,7 @@ #include #include -#include +#include namespace mongocxx { namespace v_noabi { @@ -43,4 +43,4 @@ class bulk_write::impl { } // namespace v_noabi } // namespace mongocxx -#include +#include diff --git a/src/mongocxx/lib/mongocxx/private/change_stream.hh b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/change_stream.hh similarity index 97% rename from src/mongocxx/lib/mongocxx/private/change_stream.hh rename to src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/change_stream.hh index 33505a343a..2e82dd9929 100644 --- a/src/mongocxx/lib/mongocxx/private/change_stream.hh +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/change_stream.hh @@ -23,7 +23,7 @@ #include #include -#include +#include namespace mongocxx { namespace v_noabi { @@ -123,4 +123,4 @@ class change_stream::impl { } // namespace v_noabi } // namespace mongocxx -#include +#include diff --git a/src/mongocxx/lib/mongocxx/private/client.hh b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/client.hh similarity index 93% rename from src/mongocxx/lib/mongocxx/private/client.hh rename to src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/client.hh index c9ba53c53e..3f6c23e478 100644 --- a/src/mongocxx/lib/mongocxx/private/client.hh +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/client.hh @@ -20,7 +20,7 @@ #include #include -#include +#include namespace mongocxx { namespace v_noabi { @@ -47,4 +47,4 @@ class client::impl { } // namespace v_noabi } // namespace mongocxx -#include +#include diff --git a/src/mongocxx/lib/mongocxx/private/client_encryption.hh b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/client_encryption.hh similarity index 99% rename from src/mongocxx/lib/mongocxx/private/client_encryption.hh rename to src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/client_encryption.hh index 351ce3bad7..f1f50f22f9 100644 --- a/src/mongocxx/lib/mongocxx/private/client_encryption.hh +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/client_encryption.hh @@ -36,7 +36,7 @@ #include #include -#include +#include namespace mongocxx { namespace v_noabi { @@ -364,4 +364,4 @@ class client_encryption::impl { } // namespace v_noabi } // namespace mongocxx -#include +#include diff --git a/src/mongocxx/lib/mongocxx/private/client_session.hh b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/client_session.hh similarity index 98% rename from src/mongocxx/lib/mongocxx/private/client_session.hh rename to src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/client_session.hh index 2a8cb33d88..b3e2803aa8 100644 --- a/src/mongocxx/lib/mongocxx/private/client_session.hh +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/client_session.hh @@ -31,7 +31,7 @@ #include #include -#include +#include namespace mongocxx { namespace v_noabi { @@ -242,4 +242,4 @@ class client_session::impl { } // namespace v_noabi } // namespace mongocxx -#include +#include diff --git a/src/mongocxx/lib/mongocxx/private/collection.hh b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/collection.hh similarity index 95% rename from src/mongocxx/lib/mongocxx/private/collection.hh rename to src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/collection.hh index c00f9ede36..3d9487eb5f 100644 --- a/src/mongocxx/lib/mongocxx/private/collection.hh +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/collection.hh @@ -25,7 +25,7 @@ #include #include -#include +#include namespace mongocxx { namespace v_noabi { @@ -67,4 +67,4 @@ class collection::impl { } // namespace v_noabi } // namespace mongocxx -#include +#include diff --git a/src/mongocxx/lib/mongocxx/private/conversions.cpp b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/conversions.cpp similarity index 97% rename from src/mongocxx/lib/mongocxx/private/conversions.cpp rename to src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/conversions.cpp index 0e67d84edd..5090b6311d 100644 --- a/src/mongocxx/lib/mongocxx/private/conversions.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/conversions.cpp @@ -16,7 +16,7 @@ #include -#include +#include namespace mongocxx { namespace libmongoc { diff --git a/src/mongocxx/lib/mongocxx/private/conversions.hh b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/conversions.hh similarity index 92% rename from src/mongocxx/lib/mongocxx/private/conversions.hh rename to src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/conversions.hh index 1ff36733a9..b22508102a 100644 --- a/src/mongocxx/lib/mongocxx/private/conversions.hh +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/conversions.hh @@ -18,7 +18,7 @@ #include #include -#include +#include namespace mongocxx { namespace libmongoc { @@ -34,4 +34,4 @@ read_mode_from_read_mode_t(mongoc_read_mode_t read_mode); } // namespace libmongoc } // namespace mongocxx -#include +#include diff --git a/src/mongocxx/lib/mongocxx/private/cursor.hh b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/cursor.hh similarity index 96% rename from src/mongocxx/lib/mongocxx/private/cursor.hh rename to src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/cursor.hh index 974568682f..f0e88fe2f7 100644 --- a/src/mongocxx/lib/mongocxx/private/cursor.hh +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/cursor.hh @@ -20,7 +20,7 @@ #include #include -#include +#include namespace mongocxx { namespace v_noabi { @@ -92,4 +92,4 @@ class cursor::impl { } // namespace v_noabi } // namespace mongocxx -#include +#include diff --git a/src/mongocxx/lib/mongocxx/private/database.hh b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/database.hh similarity index 94% rename from src/mongocxx/lib/mongocxx/private/database.hh rename to src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/database.hh index 5275d46dfb..7b48416588 100644 --- a/src/mongocxx/lib/mongocxx/private/database.hh +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/database.hh @@ -20,7 +20,7 @@ #include #include -#include +#include namespace mongocxx { namespace v_noabi { @@ -56,4 +56,4 @@ class database::impl { } // namespace v_noabi } // namespace mongocxx -#include +#include diff --git a/src/mongocxx/lib/mongocxx/private/index_view.hh b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/index_view.hh similarity index 99% rename from src/mongocxx/lib/mongocxx/private/index_view.hh rename to src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/index_view.hh index e22a9a932d..df5e06137e 100644 --- a/src/mongocxx/lib/mongocxx/private/index_view.hh +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/index_view.hh @@ -32,7 +32,7 @@ #include #include -#include +#include namespace mongocxx { namespace v_noabi { @@ -277,4 +277,4 @@ class index_view::impl { } // namespace v_noabi } // namespace mongocxx -#include +#include diff --git a/src/mongocxx/lib/mongocxx/private/libbson.cpp b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/libbson.cpp similarity index 98% rename from src/mongocxx/lib/mongocxx/private/libbson.cpp rename to src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/libbson.cpp index 38e66ce748..2486223763 100644 --- a/src/mongocxx/lib/mongocxx/private/libbson.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/libbson.cpp @@ -14,7 +14,7 @@ #include -#include +#include namespace mongocxx { namespace libbson { diff --git a/src/mongocxx/lib/mongocxx/private/libbson.hh b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/libbson.hh similarity index 98% rename from src/mongocxx/lib/mongocxx/private/libbson.hh rename to src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/libbson.hh index 89203843ab..71ca614bf5 100644 --- a/src/mongocxx/lib/mongocxx/private/libbson.hh +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/libbson.hh @@ -22,7 +22,7 @@ #include -#include +#include namespace mongocxx { namespace libbson { @@ -162,4 +162,4 @@ class scoped_bson_t { } // namespace libbson } // namespace mongocxx -#include +#include diff --git a/src/mongocxx/lib/mongocxx/private/libmongoc.cpp b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/libmongoc.cpp similarity index 96% rename from src/mongocxx/lib/mongocxx/private/libmongoc.cpp rename to src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/libmongoc.cpp index b51fe2a324..2ecf27c816 100644 --- a/src/mongocxx/lib/mongocxx/private/libmongoc.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/libmongoc.cpp @@ -14,7 +14,7 @@ #include "libmongoc.hh" -#include +#include namespace mongocxx { namespace libmongoc { diff --git a/src/mongocxx/lib/mongocxx/private/libmongoc.hh b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/libmongoc.hh similarity index 96% rename from src/mongocxx/lib/mongocxx/private/libmongoc.hh rename to src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/libmongoc.hh index 6be7c50709..fc86e6083a 100644 --- a/src/mongocxx/lib/mongocxx/private/libmongoc.hh +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/libmongoc.hh @@ -37,7 +37,7 @@ #include #include -#include +#include namespace mongocxx { namespace libmongoc { @@ -84,4 +84,4 @@ constexpr auto log_set_handler = mongoc_log_set_handler; } // namespace libmongoc } // namespace mongocxx -#include +#include diff --git a/src/mongocxx/lib/mongocxx/private/libmongoc_symbols.hh b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/libmongoc_symbols.hh similarity index 100% rename from src/mongocxx/lib/mongocxx/private/libmongoc_symbols.hh rename to src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/libmongoc_symbols.hh diff --git a/src/mongocxx/lib/mongocxx/private/numeric_casting.cpp b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/numeric_casting.cpp similarity index 97% rename from src/mongocxx/lib/mongocxx/private/numeric_casting.cpp rename to src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/numeric_casting.cpp index b7ed540a1c..7696d57fbc 100644 --- a/src/mongocxx/lib/mongocxx/private/numeric_casting.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/numeric_casting.cpp @@ -16,7 +16,7 @@ #include -#include +#include namespace mongocxx { diff --git a/src/mongocxx/lib/mongocxx/private/numeric_casting.hh b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/numeric_casting.hh similarity index 95% rename from src/mongocxx/lib/mongocxx/private/numeric_casting.hh rename to src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/numeric_casting.hh index e8106f5136..6eb2b0c867 100644 --- a/src/mongocxx/lib/mongocxx/private/numeric_casting.hh +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/numeric_casting.hh @@ -19,7 +19,7 @@ #include -#include +#include namespace mongocxx { @@ -45,4 +45,4 @@ MONGOCXX_ABI_EXPORT_CDECL_TESTING(bool) int64_to_size_t_safe(int64_t const in, s } // namespace mongocxx -#include +#include diff --git a/src/mongocxx/lib/mongocxx/private/pipeline.hh b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/pipeline.hh similarity index 92% rename from src/mongocxx/lib/mongocxx/private/pipeline.hh rename to src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/pipeline.hh index 75dd51ca47..1a9f4fb6dc 100644 --- a/src/mongocxx/lib/mongocxx/private/pipeline.hh +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/pipeline.hh @@ -18,7 +18,7 @@ #include -#include +#include namespace mongocxx { namespace v_noabi { @@ -47,4 +47,4 @@ class pipeline::impl { } // namespace v_noabi } // namespace mongocxx -#include +#include diff --git a/src/mongocxx/lib/mongocxx/private/pool.hh b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/pool.hh similarity index 93% rename from src/mongocxx/lib/mongocxx/private/pool.hh rename to src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/pool.hh index 1d9df1de2d..717ce6e28d 100644 --- a/src/mongocxx/lib/mongocxx/private/pool.hh +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/pool.hh @@ -20,7 +20,7 @@ #include #include -#include +#include namespace mongocxx { namespace v_noabi { @@ -47,4 +47,4 @@ class pool::impl { } // namespace v_noabi } // namespace mongocxx -#include +#include diff --git a/src/mongocxx/lib/mongocxx/private/read_concern.hh b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/read_concern.hh similarity index 92% rename from src/mongocxx/lib/mongocxx/private/read_concern.hh rename to src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/read_concern.hh index 1814a236f6..00cff1cacf 100644 --- a/src/mongocxx/lib/mongocxx/private/read_concern.hh +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/read_concern.hh @@ -17,7 +17,7 @@ #include #include -#include +#include namespace mongocxx { namespace v_noabi { @@ -42,4 +42,4 @@ class read_concern::impl { } // namespace v_noabi } // namespace mongocxx -#include +#include diff --git a/src/mongocxx/lib/mongocxx/private/read_preference.hh b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/read_preference.hh similarity index 92% rename from src/mongocxx/lib/mongocxx/private/read_preference.hh rename to src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/read_preference.hh index 26af6dc49c..b4410aa1b0 100644 --- a/src/mongocxx/lib/mongocxx/private/read_preference.hh +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/read_preference.hh @@ -17,7 +17,7 @@ #include #include -#include +#include namespace mongocxx { namespace v_noabi { @@ -42,4 +42,4 @@ class read_preference::impl { } // namespace v_noabi } // namespace mongocxx -#include +#include diff --git a/src/mongocxx/lib/mongocxx/private/scoped_bson_value.hh b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/scoped_bson_value.hh similarity index 100% rename from src/mongocxx/lib/mongocxx/private/scoped_bson_value.hh rename to src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/scoped_bson_value.hh diff --git a/src/mongocxx/lib/mongocxx/private/search_index_model.hh b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/search_index_model.hh similarity index 88% rename from src/mongocxx/lib/mongocxx/private/search_index_model.hh rename to src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/search_index_model.hh index 0d1e4ce445..f6b9581240 100644 --- a/src/mongocxx/lib/mongocxx/private/search_index_model.hh +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/search_index_model.hh @@ -4,7 +4,7 @@ #include -#include +#include namespace mongocxx { namespace v_noabi { @@ -23,4 +23,4 @@ class search_index_model::impl { } // namespace v_noabi } // namespace mongocxx -#include +#include diff --git a/src/mongocxx/lib/mongocxx/private/search_index_view.hh b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/search_index_view.hh similarity index 98% rename from src/mongocxx/lib/mongocxx/private/search_index_view.hh rename to src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/search_index_view.hh index 45f5e22605..88b7ce0ed7 100644 --- a/src/mongocxx/lib/mongocxx/private/search_index_view.hh +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/search_index_view.hh @@ -13,7 +13,7 @@ #include #include -#include +#include namespace mongocxx { namespace v_noabi { @@ -206,4 +206,4 @@ class search_index_view::impl { } // namespace v_noabi } // namespace mongocxx -#include +#include diff --git a/src/mongocxx/lib/mongocxx/private/uri.hh b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/uri.hh similarity index 92% rename from src/mongocxx/lib/mongocxx/private/uri.hh rename to src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/uri.hh index b2622f71a0..ad8edf0706 100644 --- a/src/mongocxx/lib/mongocxx/private/uri.hh +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/uri.hh @@ -17,7 +17,7 @@ #include #include -#include +#include namespace mongocxx { namespace v_noabi { @@ -38,4 +38,4 @@ class uri::impl { } // namespace v_noabi } // namespace mongocxx -#include +#include diff --git a/src/mongocxx/lib/mongocxx/private/write_concern.hh b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/write_concern.hh similarity index 92% rename from src/mongocxx/lib/mongocxx/private/write_concern.hh rename to src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/write_concern.hh index 4275178ad6..3cd9ca5941 100644 --- a/src/mongocxx/lib/mongocxx/private/write_concern.hh +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/private/write_concern.hh @@ -17,7 +17,7 @@ #include #include -#include +#include namespace mongocxx { namespace v_noabi { @@ -42,4 +42,4 @@ class write_concern::impl { } // namespace v_noabi } // namespace mongocxx -#include +#include 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 21737437de..aee5101e4f 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/read_concern.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/read_concern.cpp @@ -22,7 +22,7 @@ #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 a94a6eb1bd..68f2d693d9 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/read_preference.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/read_preference.cpp @@ -23,7 +23,7 @@ #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 8b8383976d..37e27a6257 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,7 +14,7 @@ #include -#include +#include namespace mongocxx { namespace v_noabi { 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 acba6e8598..b8751ac7e1 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/result/delete.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/result/delete.cpp @@ -14,7 +14,7 @@ #include -#include +#include namespace mongocxx { namespace v_noabi { 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 0fb9042a18..440c036f63 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,7 +16,7 @@ #include -#include +#include namespace mongocxx { namespace v_noabi { 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 1590ecb452..08a2ed89b6 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,7 +16,7 @@ #include -#include +#include namespace mongocxx { namespace v_noabi { 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 fc880db56c..b61b208635 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,7 +16,7 @@ #include -#include +#include namespace mongocxx { namespace v_noabi { 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 f918708670..33c61bc985 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,7 +14,7 @@ #include -#include +#include namespace mongocxx { namespace v_noabi { 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 b4b5ce349e..e66c31c0fc 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 @@ -16,7 +16,7 @@ #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 0ba802326e..a7901aa160 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/result/update.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/result/update.cpp @@ -14,7 +14,7 @@ #include -#include +#include namespace mongocxx { namespace v_noabi { 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 07bc6d246d..00bde7223d 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 @@ -5,7 +5,7 @@ #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 1bffcc060d..cf40b45c9f 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 @@ -5,7 +5,7 @@ #include #include -#include +#include namespace mongocxx { namespace v_noabi { diff --git a/src/mongocxx/lib/mongocxx/test_util/export_for_testing.hh b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/test_util/export_for_testing.hh similarity index 91% rename from src/mongocxx/lib/mongocxx/test_util/export_for_testing.hh rename to src/mongocxx/lib/mongocxx/v_noabi/mongocxx/test_util/export_for_testing.hh index 5f1e27cf96..4a0d149113 100644 --- a/src/mongocxx/lib/mongocxx/test_util/export_for_testing.hh +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/test_util/export_for_testing.hh @@ -14,7 +14,7 @@ #pragma once -#include +#include // See src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/test_util/export_for_testing.hh for an explanation of // the purpose of this header. @@ -27,4 +27,4 @@ #define MONGOCXX_ABI_EXPORT_CDECL_TESTING(...) __VA_ARGS__ #endif -#include +#include diff --git a/src/mongocxx/lib/mongocxx/test_util/mock.hh b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/test_util/mock.hh similarity index 98% rename from src/mongocxx/lib/mongocxx/test_util/mock.hh rename to src/mongocxx/lib/mongocxx/v_noabi/mongocxx/test_util/mock.hh index 7fa69c505b..e505aa9d28 100644 --- a/src/mongocxx/lib/mongocxx/test_util/mock.hh +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/test_util/mock.hh @@ -28,7 +28,7 @@ #include -#include +#include namespace mongocxx { namespace test_util { @@ -188,4 +188,4 @@ class mock { } // namespace test_util } // namespace mongocxx -#include +#include diff --git a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/uri.cpp b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/uri.cpp index 47658d9c5b..7293c8fb0f 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/uri.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/uri.cpp @@ -24,7 +24,7 @@ #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 b4b536ef03..040f88ec49 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/validation_criteria.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/validation_criteria.cpp @@ -20,7 +20,7 @@ #include -#include +#include namespace { 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 b585572cca..c03b7f5018 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/write_concern.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/write_concern.cpp @@ -25,7 +25,7 @@ #include #include -#include +#include namespace mongocxx { namespace v_noabi { diff --git a/src/mongocxx/test/catch_helpers.hh b/src/mongocxx/test/catch_helpers.hh index 6243494a31..0bcf1b7f07 100644 --- a/src/mongocxx/test/catch_helpers.hh +++ b/src/mongocxx/test/catch_helpers.hh @@ -17,7 +17,7 @@ #include #include -#include +#include #include @@ -258,4 +258,4 @@ class mongocxx_exception_matcher : public Catch::Matchers::MatcherBase +#include diff --git a/src/mongocxx/test/client.cpp b/src/mongocxx/test/client.cpp index e51a73286c..db06bdbae5 100644 --- a/src/mongocxx/test/client.cpp +++ b/src/mongocxx/test/client.cpp @@ -22,7 +22,7 @@ #include #include -#include +#include #include diff --git a/src/mongocxx/test/client_helpers.cpp b/src/mongocxx/test/client_helpers.cpp index a96ff2d071..a61ae47e6d 100644 --- a/src/mongocxx/test/client_helpers.cpp +++ b/src/mongocxx/test/client_helpers.cpp @@ -39,7 +39,7 @@ #include -#include +#include #include diff --git a/src/mongocxx/test/client_helpers.hh b/src/mongocxx/test/client_helpers.hh index 480806ca29..5b531c47c8 100644 --- a/src/mongocxx/test/client_helpers.hh +++ b/src/mongocxx/test/client_helpers.hh @@ -33,7 +33,7 @@ #include #include -#include +#include #include @@ -250,4 +250,4 @@ std::string getenv_or_fail(const std::string env_name); } // namespace test_util } // namespace mongocxx -#include +#include diff --git a/src/mongocxx/test/pool.cpp b/src/mongocxx/test/pool.cpp index 552f39875a..b9cf52630b 100644 --- a/src/mongocxx/test/pool.cpp +++ b/src/mongocxx/test/pool.cpp @@ -22,7 +22,7 @@ #include #include -#include +#include #include diff --git a/src/mongocxx/test/spec/monitoring.cpp b/src/mongocxx/test/spec/monitoring.cpp index acdbbb65fd..6015d6c1cb 100644 --- a/src/mongocxx/test/spec/monitoring.cpp +++ b/src/mongocxx/test/spec/monitoring.cpp @@ -20,7 +20,7 @@ #include -#include +#include #include #include @@ -357,4 +357,4 @@ void apm_checker::clear() { } // namespace spec } // namespace mongocxx -#include +#include diff --git a/src/mongocxx/test/spec/monitoring.hh b/src/mongocxx/test/spec/monitoring.hh index b7a2ece458..0b3888f391 100644 --- a/src/mongocxx/test/spec/monitoring.hh +++ b/src/mongocxx/test/spec/monitoring.hh @@ -16,7 +16,7 @@ #include -#include +#include #include #include @@ -88,4 +88,4 @@ class apm_checker { } // namespace spec } // namespace mongocxx -#include +#include diff --git a/src/mongocxx/test/spec/operation.cpp b/src/mongocxx/test/spec/operation.cpp index 5a4837182b..adb792142a 100644 --- a/src/mongocxx/test/spec/operation.cpp +++ b/src/mongocxx/test/spec/operation.cpp @@ -41,7 +41,7 @@ #include #include -#include +#include #include @@ -1580,4 +1580,4 @@ document::value operation_runner::run(document::view operation) { } // namespace spec } // namespace mongocxx -#include +#include diff --git a/src/mongocxx/test/spec/operation.hh b/src/mongocxx/test/spec/operation.hh index 2b906e5353..6e8bd2d37e 100644 --- a/src/mongocxx/test/spec/operation.hh +++ b/src/mongocxx/test/spec/operation.hh @@ -24,7 +24,7 @@ #include #include -#include +#include namespace mongocxx { namespace spec { @@ -88,4 +88,4 @@ class operation_runner { } // namespace spec } // namespace mongocxx -#include +#include diff --git a/src/mongocxx/test/spec/unified_tests/assert.hh b/src/mongocxx/test/spec/unified_tests/assert.hh index 6f4394f42c..a3be3294ba 100644 --- a/src/mongocxx/test/spec/unified_tests/assert.hh +++ b/src/mongocxx/test/spec/unified_tests/assert.hh @@ -18,7 +18,7 @@ #include -#include +#include namespace mongocxx { namespace assert { @@ -33,4 +33,4 @@ void matches( } // namespace assert } // namespace mongocxx -#include +#include diff --git a/src/mongocxx/test/spec/unified_tests/entity.hh b/src/mongocxx/test/spec/unified_tests/entity.hh index a25a11b6d4..418f2b26e0 100644 --- a/src/mongocxx/test/spec/unified_tests/entity.hh +++ b/src/mongocxx/test/spec/unified_tests/entity.hh @@ -22,7 +22,7 @@ #include #include -#include +#include namespace mongocxx { namespace entity { @@ -90,4 +90,4 @@ class map { } // namespace entity } // namespace mongocxx -#include +#include diff --git a/src/mongocxx/test/spec/unified_tests/operations.hh b/src/mongocxx/test/spec/unified_tests/operations.hh index f39a74b1b5..1c088c4215 100644 --- a/src/mongocxx/test/spec/unified_tests/operations.hh +++ b/src/mongocxx/test/spec/unified_tests/operations.hh @@ -22,7 +22,7 @@ #include #include -#include +#include #include @@ -47,4 +47,4 @@ bsoncxx::stdx::optional lookup_read_preference(bsoncxx::documen } // namespace operations } // namespace mongocxx -#include +#include diff --git a/src/mongocxx/test/spec/util.cpp b/src/mongocxx/test/spec/util.cpp index 3f32c9830f..1ce5989137 100644 --- a/src/mongocxx/test/spec/util.cpp +++ b/src/mongocxx/test/spec/util.cpp @@ -41,7 +41,7 @@ #include #include -#include +#include #include @@ -1121,4 +1121,4 @@ void run_crud_tests_in_file(std::string const& test_path, uri test_uri) { } // namespace spec } // namespace mongocxx -#include +#include diff --git a/src/mongocxx/test/spec/util.hh b/src/mongocxx/test/spec/util.hh index c453d3f64e..68aa0c8089 100644 --- a/src/mongocxx/test/spec/util.hh +++ b/src/mongocxx/test/spec/util.hh @@ -23,7 +23,7 @@ #include #include -#include +#include #include @@ -127,4 +127,4 @@ void run_crud_tests_in_file(std::string const& test_path, uri test_uri = uri{}); } // namespace spec } // namespace mongocxx -#include +#include From 7ffd8c2e391db02581271b62fbe5a28c252a754d Mon Sep 17 00:00:00 2001 From: Ezra Chung Date: Mon, 13 Jan 2025 09:01:57 -0600 Subject: [PATCH 17/19] Add static assertions for *_VERSION_STRING macros --- src/bsoncxx/lib/bsoncxx/v1/config/version.cpp | 4 ++++ src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/config/version.cpp | 4 ++++ src/mongocxx/lib/mongocxx/v1/config/version.cpp | 4 ++++ src/mongocxx/lib/mongocxx/v_noabi/mongocxx/config/version.cpp | 4 ++++ 4 files changed, 16 insertions(+) diff --git a/src/bsoncxx/lib/bsoncxx/v1/config/version.cpp b/src/bsoncxx/lib/bsoncxx/v1/config/version.cpp index 8168a00563..bebebdef89 100644 --- a/src/bsoncxx/lib/bsoncxx/v1/config/version.cpp +++ b/src/bsoncxx/lib/bsoncxx/v1/config/version.cpp @@ -14,6 +14,10 @@ #include +#if !defined(BSONCXX_VERSION_STRING) +#error "bsoncxx/v1/config/version.hpp should define BSONCXX_VERSION_STRING" +#endif + #if !defined(BSONCXX_VERSION_MAJOR) #error "bsoncxx/v1/config/version.hpp should define BSONCXX_VERSION_MAJOR" #endif diff --git a/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/config/version.cpp b/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/config/version.cpp index b67505f347..3daaaa1505 100644 --- a/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/config/version.cpp +++ b/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/config/version.cpp @@ -14,6 +14,10 @@ #include +#if !defined(BSONCXX_VERSION_STRING) +#error "bsoncxx/v_noabi/bsoncxx/config/version.hpp should define BSONCXX_VERSION_STRING" +#endif + #if !defined(BSONCXX_VERSION_MAJOR) #error "bsoncxx/v_noabi/bsoncxx/config/version.hpp should define BSONCXX_VERSION_MAJOR" #endif diff --git a/src/mongocxx/lib/mongocxx/v1/config/version.cpp b/src/mongocxx/lib/mongocxx/v1/config/version.cpp index 83d06cd427..707fceec26 100644 --- a/src/mongocxx/lib/mongocxx/v1/config/version.cpp +++ b/src/mongocxx/lib/mongocxx/v1/config/version.cpp @@ -14,6 +14,10 @@ #include +#if !defined(MONGOCXX_VERSION_STRING) +#error "mongocxx/v1/config/version.hpp should define MONGOCXX_VERSION_STRING" +#endif + #if !defined(MONGOCXX_VERSION_MAJOR) #error "mongocxx/v1/config/version.hpp should define MONGOCXX_VERSION_MAJOR" #endif diff --git a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/config/version.cpp b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/config/version.cpp index ba65b2e3d2..64327b39bf 100644 --- a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/config/version.cpp +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/config/version.cpp @@ -14,6 +14,10 @@ #include +#if !defined(MONGOCXX_VERSION_STRING) +#error "mongocxx/v_noabi/mongocxx/config/version.hpp should define MONGOCXX_VERSION_STRING" +#endif + #if !defined(MONGOCXX_VERSION_MAJOR) #error "mongocxx/v_noabi/mongocxx/config/version.hpp should define MONGOCXX_VERSION_MAJOR" #endif From df4fad9b26141392c1547bec6454cc3e58973ade Mon Sep 17 00:00:00 2001 From: Ezra Chung Date: Tue, 14 Jan 2025 10:31:52 -0600 Subject: [PATCH 18/19] Remove redundant include category of v1 private headers --- .clang-format | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.clang-format b/.clang-format index e75951136a..1732c2bc67 100644 --- a/.clang-format +++ b/.clang-format @@ -160,10 +160,6 @@ IncludeCategories: Priority: 26 - Regex: 'mongocxx/v1/.*\.hh' # v1 private headers Priority: 27 - - Regex: 'bsoncxx/v1/.*\.hh' # v1 private headers - Priority: 28 - - Regex: 'mongocxx/v1/.*\.hh' # v1 private headers - Priority: 29 - Regex: 'bsoncxx/config(/private)?/prelude\.(hpp|hh)' # v_noabi preludes Priority: 60 - Regex: 'mongocxx/config(/private)?/prelude\.(hpp|hh)' # v_noabi preludes From 045068390ec6581c22ef0427be35b058e29fb040 Mon Sep 17 00:00:00 2001 From: Ezra Chung Date: Tue, 14 Jan 2025 10:31:52 -0600 Subject: [PATCH 19/19] Update descriptions of format include categories --- .clang-format | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.clang-format b/.clang-format index 1732c2bc67..f6721e7926 100644 --- a/.clang-format +++ b/.clang-format @@ -148,9 +148,9 @@ IncludeCategories: Priority: 20 - Regex: 'mongocxx/v1/.*/prelude\.hpp' # v1 preludes Priority: 21 - - Regex: 'bsoncxx/v1/.*(-|\/)fwd\.hpp' # v1 forwarding headers + - Regex: 'bsoncxx/v1/.*(-|\/)fwd\.hpp' # v1 forward headers Priority: 22 - - Regex: 'mongocxx/v1/.*(-|\/)fwd\.hpp' # v1 forwarding headers + - Regex: 'mongocxx/v1/.*(-|\/)fwd\.hpp' # v1 forward headers Priority: 23 - Regex: 'bsoncxx/v1/.*\.hpp' # v1 public headers Priority: 24 @@ -170,13 +170,13 @@ IncludeCategories: Priority: 71 - Regex: '<[[:alnum:]_.]+>' # system headers Priority: 30 - - Regex: 'bsoncxx/.*(-|\/)fwd\.(hpp|hh)' # all driver forwarding headers + - Regex: 'bsoncxx/.*(-|\/)fwd\.(hpp|hh)' # all remaining forward headers Priority: 40 - - Regex: 'mongocxx/.*(-|\/)fwd\.(hpp|hh)' # all driver forwarding headers + - Regex: 'mongocxx/.*(-|\/)fwd\.(hpp|hh)' # all remaining forward headers Priority: 41 - - Regex: 'bsoncxx/.*' # all remaining (normal) driver headers + - Regex: 'bsoncxx/.*' # all remaining headers Priority: 50 - - Regex: 'mongocxx/.*' # all remaining (normal) driver headers + - Regex: 'mongocxx/.*' # all remaining headers Priority: 51 - Regex: '.*' # all other headers (third party) Priority: 90