Skip to content

Commit 8e86136

Browse files
authored
CXX-2790 Redeclare mongocxx::v_noabi as a non-inline namespace (#1070)
* Redeclare mongocxx::v_noabi as a non-inline namespace * Fix additional root namespace references missing ABI namespace qualifier * ABI-qualify all references to bsoncxx in mongocxx::v_noabi
1 parent 7134ae2 commit 8e86136

File tree

335 files changed

+3983
-2838
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

335 files changed

+3983
-2838
lines changed

src/mongocxx/include/mongocxx/v_noabi/mongocxx/bulk_write-fwd.hpp

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,17 @@
1717
#include <mongocxx/config/prelude.hpp>
1818

1919
namespace mongocxx {
20-
inline namespace v_noabi { class MONGOCXX_API bulk_write; } // namespace v_noabi
20+
namespace v_noabi {
21+
22+
class MONGOCXX_API bulk_write;
23+
24+
} // namespace v_noabi
25+
} // namespace mongocxx
26+
27+
namespace mongocxx {
28+
29+
using ::mongocxx::v_noabi::bulk_write;
30+
2131
} // namespace mongocxx
2232

2333
#include <mongocxx/config/postlude.hpp>

src/mongocxx/include/mongocxx/v_noabi/mongocxx/bulk_write.hpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@
2525
#include <mongocxx/config/prelude.hpp>
2626

2727
namespace mongocxx {
28-
inline namespace v_noabi {
28+
namespace v_noabi {
29+
2930
///
3031
/// Class representing a batch of write operations that can be sent to the server as a group.
3132
///
@@ -77,14 +78,14 @@ class bulk_write {
7778
/// A reference to the object on which this member function is being called. This facilitates
7879
/// method chaining.
7980
///
80-
/// @throws mongocxx::logic_error if the given operation is invalid.
81+
/// @throws mongocxx::v_noabi::logic_error if the given operation is invalid.
8182
///
8283
bulk_write& append(const model::write& operation);
8384

8485
///
8586
/// Executes a bulk write.
8687
///
87-
/// @throws mongocxx::bulk_write_exception when there are errors processing the writes.
88+
/// @throws mongocxx::v_noabi::bulk_write_exception when there are errors processing the writes.
8889
///
8990
/// @return The optional result of the bulk operation execution, a result::bulk_write.
9091
///

src/mongocxx/include/mongocxx/v_noabi/mongocxx/change_stream-fwd.hpp

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,17 @@
1717
#include <mongocxx/config/prelude.hpp>
1818

1919
namespace mongocxx {
20-
inline namespace v_noabi { class MONGOCXX_API change_stream; } // namespace v_noabi
20+
namespace v_noabi {
21+
22+
class MONGOCXX_API change_stream;
23+
24+
} // namespace v_noabi
25+
} // namespace mongocxx
26+
27+
namespace mongocxx {
28+
29+
using ::mongocxx::v_noabi::change_stream;
30+
2131
} // namespace mongocxx
2232

2333
#include <mongocxx/config/postlude.hpp>

src/mongocxx/include/mongocxx/v_noabi/mongocxx/change_stream.hpp

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@
2727
#include <mongocxx/config/prelude.hpp>
2828

2929
namespace mongocxx {
30-
inline namespace v_noabi {
30+
namespace v_noabi {
31+
3132
///
3233
/// Class representing a MongoDB change stream.
3334
///
@@ -69,7 +70,7 @@ class change_stream {
6970
/// @return
7071
/// The change_stream::iterator
7172
/// @exception
72-
/// Throws mongocxx::query_exception if the query failed.
73+
/// Throws mongocxx::v_noabi::query_exception if the query failed.
7374
///
7475
iterator begin() const;
7576

@@ -105,7 +106,7 @@ class change_stream {
105106
/// @return
106107
/// The token.
107108
///
108-
bsoncxx::stdx::optional<bsoncxx::document::view> get_resume_token() const;
109+
bsoncxx::v_noabi::stdx::optional<bsoncxx::v_noabi::document::view> get_resume_token() const;
109110

110111
private:
111112
friend ::mongocxx::v_noabi::client;
@@ -127,7 +128,7 @@ class change_stream::iterator {
127128
public:
128129
// Support input-iterator (caveat of post-increment returning void)
129130
using difference_type = std::int64_t;
130-
using value_type = const bsoncxx::document::view;
131+
using value_type = const bsoncxx::v_noabi::document::view;
131132
using pointer = std::add_pointer<value_type>::type;
132133
using reference = std::add_lvalue_reference<value_type>::type;
133134
using iterator_category = std::input_iterator_tag;
@@ -145,15 +146,15 @@ class change_stream::iterator {
145146
/// The returned document::view is valid until the iterator is incremented. The value may be
146147
/// copied to extend its lifetime.
147148
///
148-
const bsoncxx::document::view& operator*() const;
149+
const bsoncxx::v_noabi::document::view& operator*() const;
149150

150151
///
151152
/// Accesses a member of the dereferenced document currently being pointed to.
152153
///
153154
/// The returned document::view is valid until the iterator is incremented. The value may be
154155
/// copied to extend its lifetime.
155156
///
156-
const bsoncxx::document::view* operator->() const;
157+
const bsoncxx::v_noabi::document::view* operator->() const;
157158

158159
///
159160
/// Pre-increments the iterator to move to the next document.
@@ -166,7 +167,7 @@ class change_stream::iterator {
166167
/// If no notification is available, callers may call change_stream::begin() to check for more
167168
/// notifications.
168169
///
169-
/// @throws mongocxx::query_exception if the query failed
170+
/// @throws mongocxx::v_noabi::query_exception if the query failed
170171
///
171172
iterator& operator++();
172173

@@ -181,7 +182,7 @@ class change_stream::iterator {
181182
/// If no notification is available, callers may call change_stream::begin() to check for more
182183
/// notifications.
183184
///
184-
/// @throws mongocxx::query_exception if the query failed
185+
/// @throws mongocxx::v_noabi::query_exception if the query failed
185186
///
186187
void operator++(int);
187188

src/mongocxx/include/mongocxx/v_noabi/mongocxx/client-fwd.hpp

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,17 @@
1717
#include <mongocxx/config/prelude.hpp>
1818

1919
namespace mongocxx {
20-
inline namespace v_noabi { class MONGOCXX_API client; } // namespace v_noabi
20+
namespace v_noabi {
21+
22+
class MONGOCXX_API client;
23+
24+
} // namespace v_noabi
25+
} // namespace mongocxx
26+
27+
namespace mongocxx {
28+
29+
using ::mongocxx::v_noabi::client;
30+
2131
} // namespace mongocxx
2232

2333
#include <mongocxx/config/postlude.hpp>

0 commit comments

Comments
 (0)