Skip to content

CXX-2790 Redeclare mongocxx::v_noabi as a non-inline namespace #1070

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 37 commits into from
Jan 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
ca15294
Rename mongocxx::v_noabi to mongocxx::wip
eramongodb Dec 12, 2023
07513ed
mongocxx::stdx
eramongodb Dec 12, 2023
ef02217
mongocxx::events
eramongodb Dec 12, 2023
2b39639
mongocxx exceptions
eramongodb Dec 12, 2023
46d571e
mongocxx::gridfs
eramongodb Dec 12, 2023
60ff2ae
mongocxx::model
eramongodb Dec 12, 2023
8de0f89
mongocxx::options
eramongodb Dec 12, 2023
577037a
mongocxx::result
eramongodb Dec 12, 2023
eef28d8
mongocxx::bulk_write
eramongodb Dec 12, 2023
08ac4b1
mongocxx::change_stream
eramongodb Dec 12, 2023
55681f8
mongocxx::client_encryption
eramongodb Dec 12, 2023
52d06de
mongocxx::client_session
eramongodb Dec 12, 2023
9926fe6
mongocxx::client
eramongodb Dec 12, 2023
f2317d1
mongocxx::collection
eramongodb Dec 12, 2023
8143441
mongocxx::cursor
eramongodb Dec 12, 2023
4eefa1b
mongocxx::database
eramongodb Dec 12, 2023
7b1659b
mongocxx::hint
eramongodb Dec 12, 2023
44c7df5
mongocxx::index_model
eramongodb Dec 12, 2023
b79201b
mongocxx::index_view
eramongodb Dec 12, 2023
6997c0c
mongocxx::instance
eramongodb Dec 12, 2023
26f8d91
mongocxx::logger
eramongodb Dec 12, 2023
43464b3
mongocxx::pipeline
eramongodb Dec 12, 2023
4b20546
mongocxx::pool
eramongodb Dec 12, 2023
d2ed4c6
mongocxx::read_concern
eramongodb Dec 12, 2023
33ea44b
mongocxx::read_preference
eramongodb Dec 12, 2023
ad6e6b2
mongocxx::search_index_model
eramongodb Dec 12, 2023
ef40ce7
mongocxx::search_index_view
eramongodb Dec 12, 2023
c2b5fa1
mongocxx::uri
eramongodb Dec 12, 2023
f0e4900
mongocxx::validation_criteria
eramongodb Dec 12, 2023
125107d
mongocxx::write_concern
eramongodb Dec 12, 2023
8d8b827
mongocxx::write_type
eramongodb Dec 12, 2023
5a908b9
Revert changes to mongocxx::error_code messages
eramongodb Dec 12, 2023
33067b3
mongocxx private and test headers
eramongodb Dec 12, 2023
e3b4180
Fix additional root namespace references missing ABI namespace qualifier
eramongodb Dec 14, 2023
919a89a
Revert deprecation of mongocxx::v_noabi::stdx
eramongodb Dec 14, 2023
d9349c7
ABI-qualify all references to bsoncxx in mongocxx::v_noabi
eramongodb Dec 14, 2023
6c506a2
Merge remote-tracking branch 'upstream/master' into cxx-2790
eramongodb Jan 2, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,17 @@
#include <mongocxx/config/prelude.hpp>

namespace mongocxx {
inline namespace v_noabi { class MONGOCXX_API bulk_write; } // namespace v_noabi
namespace v_noabi {

class MONGOCXX_API bulk_write;

} // namespace v_noabi
} // namespace mongocxx

namespace mongocxx {

using ::mongocxx::v_noabi::bulk_write;

} // namespace mongocxx

#include <mongocxx/config/postlude.hpp>
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@
#include <mongocxx/config/prelude.hpp>

namespace mongocxx {
inline namespace v_noabi {
namespace v_noabi {

///
/// Class representing a batch of write operations that can be sent to the server as a group.
///
Expand Down Expand Up @@ -77,14 +78,14 @@ class bulk_write {
/// A reference to the object on which this member function is being called. This facilitates
/// method chaining.
///
/// @throws mongocxx::logic_error if the given operation is invalid.
/// @throws mongocxx::v_noabi::logic_error if the given operation is invalid.
///
bulk_write& append(const model::write& operation);

///
/// Executes a bulk write.
///
/// @throws mongocxx::bulk_write_exception when there are errors processing the writes.
/// @throws mongocxx::v_noabi::bulk_write_exception when there are errors processing the writes.
///
/// @return The optional result of the bulk operation execution, a result::bulk_write.
///
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,17 @@
#include <mongocxx/config/prelude.hpp>

namespace mongocxx {
inline namespace v_noabi { class MONGOCXX_API change_stream; } // namespace v_noabi
namespace v_noabi {

class MONGOCXX_API change_stream;

} // namespace v_noabi
} // namespace mongocxx

namespace mongocxx {

using ::mongocxx::v_noabi::change_stream;

} // namespace mongocxx

#include <mongocxx/config/postlude.hpp>
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@
#include <mongocxx/config/prelude.hpp>

namespace mongocxx {
inline namespace v_noabi {
namespace v_noabi {

///
/// Class representing a MongoDB change stream.
///
Expand Down Expand Up @@ -69,7 +70,7 @@ class change_stream {
/// @return
/// The change_stream::iterator
/// @exception
/// Throws mongocxx::query_exception if the query failed.
/// Throws mongocxx::v_noabi::query_exception if the query failed.
///
iterator begin() const;

Expand Down Expand Up @@ -105,7 +106,7 @@ class change_stream {
/// @return
/// The token.
///
bsoncxx::stdx::optional<bsoncxx::document::view> get_resume_token() const;
bsoncxx::v_noabi::stdx::optional<bsoncxx::v_noabi::document::view> get_resume_token() const;

private:
friend ::mongocxx::v_noabi::client;
Expand All @@ -127,7 +128,7 @@ class change_stream::iterator {
public:
// Support input-iterator (caveat of post-increment returning void)
using difference_type = std::int64_t;
using value_type = const bsoncxx::document::view;
using value_type = const bsoncxx::v_noabi::document::view;
using pointer = std::add_pointer<value_type>::type;
using reference = std::add_lvalue_reference<value_type>::type;
using iterator_category = std::input_iterator_tag;
Expand All @@ -145,15 +146,15 @@ class change_stream::iterator {
/// The returned document::view is valid until the iterator is incremented. The value may be
/// copied to extend its lifetime.
///
const bsoncxx::document::view& operator*() const;
const bsoncxx::v_noabi::document::view& operator*() const;

///
/// Accesses a member of the dereferenced document currently being pointed to.
///
/// The returned document::view is valid until the iterator is incremented. The value may be
/// copied to extend its lifetime.
///
const bsoncxx::document::view* operator->() const;
const bsoncxx::v_noabi::document::view* operator->() const;

///
/// Pre-increments the iterator to move to the next document.
Expand All @@ -166,7 +167,7 @@ class change_stream::iterator {
/// If no notification is available, callers may call change_stream::begin() to check for more
/// notifications.
///
/// @throws mongocxx::query_exception if the query failed
/// @throws mongocxx::v_noabi::query_exception if the query failed
///
iterator& operator++();

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

Expand Down
12 changes: 11 additions & 1 deletion src/mongocxx/include/mongocxx/v_noabi/mongocxx/client-fwd.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,17 @@
#include <mongocxx/config/prelude.hpp>

namespace mongocxx {
inline namespace v_noabi { class MONGOCXX_API client; } // namespace v_noabi
namespace v_noabi {

class MONGOCXX_API client;

} // namespace v_noabi
} // namespace mongocxx

namespace mongocxx {

using ::mongocxx::v_noabi::client;

} // namespace mongocxx

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