Skip to content

Update main() declarations in examples #1191

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 1 commit into from
Aug 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/bsoncxx/builder_basic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

using namespace bsoncxx;

int main(int, char**) {
int main() {
// bsoncxx::builder::basic presents a BSON-construction interface familiar to users of the
// server's
// BSON library or the Java driver.
Expand Down
2 changes: 1 addition & 1 deletion examples/bsoncxx/builder_core.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

using namespace bsoncxx;

int main(int, char**) {
int main() {
// bsoncxx::builder::core is a low-level primitive that can be useful for building other
// BSON abstractions. Most users should just use builder::stream or builder::basic.

Expand Down
2 changes: 1 addition & 1 deletion examples/bsoncxx/builder_list.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

using namespace bsoncxx;

int main(int, char**) {
int main() {
using namespace bsoncxx::builder;

//
Expand Down
2 changes: 1 addition & 1 deletion examples/bsoncxx/builder_stream.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

using namespace bsoncxx;

int main(int, char**) {
int main() {
using builder::stream::array;
using builder::stream::document;

Expand Down
2 changes: 1 addition & 1 deletion examples/bsoncxx/builder_stream_customization.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ range_kvp_appender<begin_t, end_t> make_range_kvp_appender(begin_t&& begin, end_
std::forward<end_t>(end));
}

int main(int, char**) {
int main() {
using builder::stream::array;
using builder::stream::document;
using builder::stream::finalize;
Expand Down
2 changes: 1 addition & 1 deletion examples/bsoncxx/decimal128.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

using namespace bsoncxx;

int main(int, char**) {
int main() {
// Convert a string to BSON Decimal128.
decimal128 d128;
try {
Expand Down
2 changes: 1 addition & 1 deletion examples/bsoncxx/getting_values.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

using namespace bsoncxx;

int main(int, char**) {
int main() {
using namespace builder::stream;

builder::stream::document build_doc;
Expand Down
2 changes: 1 addition & 1 deletion examples/bsoncxx/view_and_value.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@

using namespace bsoncxx;

int main(int, char**) {
int main() {
// This example will cover the read-only BSON interface.

// Lets first build up a non-trivial BSON document using the builder interface.
Expand Down
2 changes: 1 addition & 1 deletion examples/mongocxx/aggregate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
using bsoncxx::builder::basic::kvp;
using bsoncxx::builder::basic::make_document;

int main(int, char**) {
int main() {
// The mongocxx::instance constructor and destructor initialize and shut down the driver,
// respectively. Therefore, a mongocxx::instance must be created before using the driver and
// must remain alive for as long as the driver is in use.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ bsoncxx::document::value doc_from_file(std::string path) {
return bsoncxx::from_json(file_contents);
}

int main(int, char**) {
int main() {
instance inst{};

// This must be the same master key that was used to create
Expand Down
2 changes: 1 addition & 1 deletion examples/mongocxx/bulk_write.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
using bsoncxx::builder::basic::kvp;
using bsoncxx::builder::basic::make_document;

int main(int, char**) {
int main() {
// The mongocxx::instance constructor and destructor initialize and shut down the driver,
// respectively. Therefore, a mongocxx::instance must be created before using the driver and
// must remain alive for as long as the driver is in use.
Expand Down
2 changes: 1 addition & 1 deletion examples/mongocxx/create.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ using bsoncxx::builder::basic::kvp;
using bsoncxx::builder::basic::make_array;
using bsoncxx::builder::basic::make_document;

int main(int, char**) {
int main() {
// The mongocxx::instance constructor and destructor initialize and shut down the driver,
// respectively. Therefore, a mongocxx::instance must be created before using the driver and
// must remain alive for as long as the driver is in use.
Expand Down
2 changes: 1 addition & 1 deletion examples/mongocxx/document_validation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ using bsoncxx::stdx::string_view;
using mongocxx::collection;
using mongocxx::validation_criteria;

int main(int, char**) {
int main() {
// The mongocxx::instance constructor and destructor initialize and shut down the driver,
// respectively. Therefore, a mongocxx::instance must be created before using the driver and
// must remain alive for as long as the driver is in use.
Expand Down
2 changes: 1 addition & 1 deletion examples/mongocxx/exception.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
using bsoncxx::builder::basic::kvp;
using bsoncxx::builder::basic::make_document;

int main(int, char**) {
int main() {
// The mongocxx::instance constructor and destructor initialize and shut down the driver,
// respectively. Therefore, a mongocxx::instance must be created before using the driver and
// must remain alive for as long as the driver is in use.
Expand Down
2 changes: 1 addition & 1 deletion examples/mongocxx/explicit_encryption.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ using namespace mongocxx;

const int kKeyLength = 96;

int main(int, char**) {
int main() {
instance inst{};

// This must be the same master key that was used to create
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ using namespace mongocxx;

const int kKeyLength = 96;

int main(int, char**) {
int main() {
instance inst{};

// This must be the same master key that was used to create
Expand Down
2 changes: 1 addition & 1 deletion examples/mongocxx/index.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
using bsoncxx::builder::basic::kvp;
using bsoncxx::builder::basic::make_document;

int main(int, char**) {
int main() {
// The mongocxx::instance constructor and destructor initialize and shut down the driver,
// respectively. Therefore, a mongocxx::instance must be created before using the driver and
// must remain alive for as long as the driver is in use.
Expand Down
2 changes: 1 addition & 1 deletion examples/mongocxx/inserted_id.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
using bsoncxx::builder::basic::kvp;
using bsoncxx::builder::basic::make_document;

int main(int, char**) {
int main() {
// The mongocxx::instance constructor and destructor initialize and shut down the driver,
// respectively. Therefore, a mongocxx::instance must be created before using the driver and
// must remain alive for as long as the driver is in use.
Expand Down
2 changes: 1 addition & 1 deletion examples/mongocxx/query.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ using bsoncxx::builder::basic::kvp;
using bsoncxx::builder::basic::make_array;
using bsoncxx::builder::basic::make_document;

int main(int, char**) {
int main() {
// The mongocxx::instance constructor and destructor initialize and shut down the driver,
// respectively. Therefore, a mongocxx::instance must be created before using the driver and
// must remain alive for as long as the driver is in use.
Expand Down
2 changes: 1 addition & 1 deletion examples/mongocxx/query_projection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
using bsoncxx::builder::basic::kvp;
using bsoncxx::builder::basic::make_document;

int main(int, char**) {
int main() {
// The mongocxx::instance constructor and destructor initialize and shut down the driver,
// respectively. Therefore, a mongocxx::instance must be created before using the driver and
// must remain alive for as long as the driver is in use.
Expand Down
2 changes: 1 addition & 1 deletion examples/mongocxx/remove.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
using bsoncxx::builder::basic::kvp;
using bsoncxx::builder::basic::make_document;

int main(int, char**) {
int main() {
// The mongocxx::instance constructor and destructor initialize and shut down the driver,
// respectively. Therefore, a mongocxx::instance must be created before using the driver and
// must remain alive for as long as the driver is in use.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ using namespace mongocxx;

const int kKeyLength = 96;

int main(int, char**) {
int main() {
instance inst{};

// This must be the same master key that was used to create
Expand Down
2 changes: 1 addition & 1 deletion examples/mongocxx/tailable_cursor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ void insert_docs(mongocxx::collection* coll) {
}
}

int main(int, char**) {
int main() {
// The mongocxx::instance constructor and destructor initialize and shut down the driver,
// respectively. Therefore, a mongocxx::instance must be created before using the driver and
// must remain alive for as long as the driver is in use.
Expand Down
2 changes: 1 addition & 1 deletion examples/mongocxx/update.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ using bsoncxx::builder::basic::kvp;
using bsoncxx::builder::basic::make_array;
using bsoncxx::builder::basic::make_document;

int main(int, char**) {
int main() {
// The mongocxx::instance constructor and destructor initialize and shut down the driver,
// respectively. Therefore, a mongocxx::instance must be created before using the driver and
// must remain alive for as long as the driver is in use.
Expand Down
2 changes: 1 addition & 1 deletion examples/mongocxx/view_or_value_variant.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ using bsoncxx::builder::basic::array;
using bsoncxx::builder::basic::kvp;
using bsoncxx::builder::basic::make_document;

int main(int, char**) {
int main() {
// The mongocxx::instance constructor and destructor initialize and shut down the driver,
// respectively. Therefore, a mongocxx::instance must be created before using the driver and
// must remain alive for as long as the driver is in use.
Expand Down