From ae980ce52764a95aa32e27e2078aa83a4d8c60df Mon Sep 17 00:00:00 2001 From: Florian Albrechtskirchinger Date: Mon, 25 Jul 2022 15:21:11 +0200 Subject: [PATCH] Add 'using namespace' to examples --- docs/examples/at__json_pointer.cpp | 1 + docs/examples/at__json_pointer_const.cpp | 1 + docs/examples/contains__json_pointer.cpp | 1 + docs/examples/contains__keytype.c++17.cpp | 1 + docs/examples/contains__object_t_key_type.cpp | 1 + docs/examples/diff.cpp | 1 + docs/examples/merge_patch.cpp | 1 + docs/examples/nlohmann_define_type_intrusive_explicit.cpp | 1 + docs/examples/nlohmann_define_type_intrusive_macro.cpp | 1 + .../nlohmann_define_type_intrusive_with_default_explicit.cpp | 1 + .../nlohmann_define_type_intrusive_with_default_macro.cpp | 1 + docs/examples/nlohmann_define_type_non_intrusive_explicit.cpp | 1 + docs/examples/nlohmann_define_type_non_intrusive_macro.cpp | 1 + .../nlohmann_define_type_non_intrusive_with_default_explicit.cpp | 1 + .../nlohmann_define_type_non_intrusive_with_default_macro.cpp | 1 + docs/examples/operator_array__json_pointer.cpp | 1 + docs/examples/operator_array__json_pointer_const.cpp | 1 + docs/examples/operator_literal_json.cpp | 1 + docs/examples/operator_literal_json_pointer.cpp | 1 + docs/examples/other_error.cpp | 1 + docs/examples/patch.cpp | 1 + docs/examples/patch_inplace.cpp | 1 + docs/examples/std_hash.cpp | 1 + docs/examples/to_bjdata.cpp | 1 + docs/examples/to_bson.cpp | 1 + docs/examples/to_cbor.cpp | 1 + docs/examples/to_msgpack.cpp | 1 + docs/examples/to_ubjson.cpp | 1 + docs/examples/update.cpp | 1 + docs/examples/update__range.cpp | 1 + docs/examples/value__json_ptr.cpp | 1 + 31 files changed, 31 insertions(+) diff --git a/docs/examples/at__json_pointer.cpp b/docs/examples/at__json_pointer.cpp index f554d8533..26dfd8edd 100644 --- a/docs/examples/at__json_pointer.cpp +++ b/docs/examples/at__json_pointer.cpp @@ -2,6 +2,7 @@ #include using json = nlohmann::json; +using namespace nlohmann::literals; int main() { diff --git a/docs/examples/at__json_pointer_const.cpp b/docs/examples/at__json_pointer_const.cpp index 3ac232b9f..f049bd8d9 100644 --- a/docs/examples/at__json_pointer_const.cpp +++ b/docs/examples/at__json_pointer_const.cpp @@ -2,6 +2,7 @@ #include using json = nlohmann::json; +using namespace nlohmann::literals; int main() { diff --git a/docs/examples/contains__json_pointer.cpp b/docs/examples/contains__json_pointer.cpp index 54bcaa9e4..f9de546b5 100644 --- a/docs/examples/contains__json_pointer.cpp +++ b/docs/examples/contains__json_pointer.cpp @@ -2,6 +2,7 @@ #include using json = nlohmann::json; +using namespace nlohmann::literals; int main() { diff --git a/docs/examples/contains__keytype.c++17.cpp b/docs/examples/contains__keytype.c++17.cpp index 998079c76..43b62fab1 100644 --- a/docs/examples/contains__keytype.c++17.cpp +++ b/docs/examples/contains__keytype.c++17.cpp @@ -4,6 +4,7 @@ using namespace std::string_view_literals; using json = nlohmann::json; +using namespace nlohmann::literals; int main() { diff --git a/docs/examples/contains__object_t_key_type.cpp b/docs/examples/contains__object_t_key_type.cpp index df8201c33..a8bc8143d 100644 --- a/docs/examples/contains__object_t_key_type.cpp +++ b/docs/examples/contains__object_t_key_type.cpp @@ -2,6 +2,7 @@ #include using json = nlohmann::json; +using namespace nlohmann::literals; int main() { diff --git a/docs/examples/diff.cpp b/docs/examples/diff.cpp index 71b19be66..ef01332a1 100644 --- a/docs/examples/diff.cpp +++ b/docs/examples/diff.cpp @@ -3,6 +3,7 @@ #include using json = nlohmann::json; +using namespace nlohmann::literals; int main() { diff --git a/docs/examples/merge_patch.cpp b/docs/examples/merge_patch.cpp index b8804d7c5..f3fee1ed1 100644 --- a/docs/examples/merge_patch.cpp +++ b/docs/examples/merge_patch.cpp @@ -3,6 +3,7 @@ #include // for std::setw using json = nlohmann::json; +using namespace nlohmann::literals; int main() { diff --git a/docs/examples/nlohmann_define_type_intrusive_explicit.cpp b/docs/examples/nlohmann_define_type_intrusive_explicit.cpp index fb7701dec..7d2ba8aa1 100644 --- a/docs/examples/nlohmann_define_type_intrusive_explicit.cpp +++ b/docs/examples/nlohmann_define_type_intrusive_explicit.cpp @@ -2,6 +2,7 @@ #include using json = nlohmann::json; +using namespace nlohmann::literals; namespace ns { diff --git a/docs/examples/nlohmann_define_type_intrusive_macro.cpp b/docs/examples/nlohmann_define_type_intrusive_macro.cpp index ce292659a..2977cd456 100644 --- a/docs/examples/nlohmann_define_type_intrusive_macro.cpp +++ b/docs/examples/nlohmann_define_type_intrusive_macro.cpp @@ -2,6 +2,7 @@ #include using json = nlohmann::json; +using namespace nlohmann::literals; namespace ns { diff --git a/docs/examples/nlohmann_define_type_intrusive_with_default_explicit.cpp b/docs/examples/nlohmann_define_type_intrusive_with_default_explicit.cpp index 621ed1452..7400c47a8 100644 --- a/docs/examples/nlohmann_define_type_intrusive_with_default_explicit.cpp +++ b/docs/examples/nlohmann_define_type_intrusive_with_default_explicit.cpp @@ -2,6 +2,7 @@ #include using json = nlohmann::json; +using namespace nlohmann::literals; namespace ns { diff --git a/docs/examples/nlohmann_define_type_intrusive_with_default_macro.cpp b/docs/examples/nlohmann_define_type_intrusive_with_default_macro.cpp index 7851f526e..851a3582f 100644 --- a/docs/examples/nlohmann_define_type_intrusive_with_default_macro.cpp +++ b/docs/examples/nlohmann_define_type_intrusive_with_default_macro.cpp @@ -2,6 +2,7 @@ #include using json = nlohmann::json; +using namespace nlohmann::literals; namespace ns { diff --git a/docs/examples/nlohmann_define_type_non_intrusive_explicit.cpp b/docs/examples/nlohmann_define_type_non_intrusive_explicit.cpp index b9d30dd8f..b71613d4f 100644 --- a/docs/examples/nlohmann_define_type_non_intrusive_explicit.cpp +++ b/docs/examples/nlohmann_define_type_non_intrusive_explicit.cpp @@ -2,6 +2,7 @@ #include using json = nlohmann::json; +using namespace nlohmann::literals; namespace ns { diff --git a/docs/examples/nlohmann_define_type_non_intrusive_macro.cpp b/docs/examples/nlohmann_define_type_non_intrusive_macro.cpp index b073ef615..be11a4576 100644 --- a/docs/examples/nlohmann_define_type_non_intrusive_macro.cpp +++ b/docs/examples/nlohmann_define_type_non_intrusive_macro.cpp @@ -2,6 +2,7 @@ #include using json = nlohmann::json; +using namespace nlohmann::literals; namespace ns { diff --git a/docs/examples/nlohmann_define_type_non_intrusive_with_default_explicit.cpp b/docs/examples/nlohmann_define_type_non_intrusive_with_default_explicit.cpp index 21967b638..6b538d18d 100644 --- a/docs/examples/nlohmann_define_type_non_intrusive_with_default_explicit.cpp +++ b/docs/examples/nlohmann_define_type_non_intrusive_with_default_explicit.cpp @@ -2,6 +2,7 @@ #include using json = nlohmann::json; +using namespace nlohmann::literals; namespace ns { diff --git a/docs/examples/nlohmann_define_type_non_intrusive_with_default_macro.cpp b/docs/examples/nlohmann_define_type_non_intrusive_with_default_macro.cpp index 470fed69c..aa9bc53b4 100644 --- a/docs/examples/nlohmann_define_type_non_intrusive_with_default_macro.cpp +++ b/docs/examples/nlohmann_define_type_non_intrusive_with_default_macro.cpp @@ -2,6 +2,7 @@ #include using json = nlohmann::json; +using namespace nlohmann::literals; namespace ns { diff --git a/docs/examples/operator_array__json_pointer.cpp b/docs/examples/operator_array__json_pointer.cpp index 7a0353a1c..0fa207f02 100644 --- a/docs/examples/operator_array__json_pointer.cpp +++ b/docs/examples/operator_array__json_pointer.cpp @@ -2,6 +2,7 @@ #include using json = nlohmann::json; +using namespace nlohmann::literals; int main() { diff --git a/docs/examples/operator_array__json_pointer_const.cpp b/docs/examples/operator_array__json_pointer_const.cpp index a5a437b44..f40e2494a 100644 --- a/docs/examples/operator_array__json_pointer_const.cpp +++ b/docs/examples/operator_array__json_pointer_const.cpp @@ -2,6 +2,7 @@ #include using json = nlohmann::json; +using namespace nlohmann::literals; int main() { diff --git a/docs/examples/operator_literal_json.cpp b/docs/examples/operator_literal_json.cpp index 2ec008eb4..84ca6297d 100644 --- a/docs/examples/operator_literal_json.cpp +++ b/docs/examples/operator_literal_json.cpp @@ -3,6 +3,7 @@ #include using json = nlohmann::json; +using namespace nlohmann::literals; int main() { diff --git a/docs/examples/operator_literal_json_pointer.cpp b/docs/examples/operator_literal_json_pointer.cpp index bbdb974af..aba93e88e 100644 --- a/docs/examples/operator_literal_json_pointer.cpp +++ b/docs/examples/operator_literal_json_pointer.cpp @@ -3,6 +3,7 @@ #include using json = nlohmann::json; +using namespace nlohmann::literals; int main() { diff --git a/docs/examples/other_error.cpp b/docs/examples/other_error.cpp index 2e7ccfbb8..99c4be70e 100644 --- a/docs/examples/other_error.cpp +++ b/docs/examples/other_error.cpp @@ -2,6 +2,7 @@ #include using json = nlohmann::json; +using namespace nlohmann::literals; int main() { diff --git a/docs/examples/patch.cpp b/docs/examples/patch.cpp index b0896c794..b7ecb8eee 100644 --- a/docs/examples/patch.cpp +++ b/docs/examples/patch.cpp @@ -3,6 +3,7 @@ #include using json = nlohmann::json; +using namespace nlohmann::literals; int main() { diff --git a/docs/examples/patch_inplace.cpp b/docs/examples/patch_inplace.cpp index 2224b7061..061708a2d 100644 --- a/docs/examples/patch_inplace.cpp +++ b/docs/examples/patch_inplace.cpp @@ -3,6 +3,7 @@ #include using json = nlohmann::json; +using namespace nlohmann::literals; int main() { diff --git a/docs/examples/std_hash.cpp b/docs/examples/std_hash.cpp index eee0fad0c..9721910eb 100644 --- a/docs/examples/std_hash.cpp +++ b/docs/examples/std_hash.cpp @@ -3,6 +3,7 @@ #include using json = nlohmann::json; +using namespace nlohmann::literals; int main() { diff --git a/docs/examples/to_bjdata.cpp b/docs/examples/to_bjdata.cpp index 0bfe33323..9b7abac4e 100644 --- a/docs/examples/to_bjdata.cpp +++ b/docs/examples/to_bjdata.cpp @@ -3,6 +3,7 @@ #include using json = nlohmann::json; +using namespace nlohmann::literals; // function to print BJData's diagnostic format void print_byte(uint8_t byte) diff --git a/docs/examples/to_bson.cpp b/docs/examples/to_bson.cpp index 2dd448768..3484b0b76 100644 --- a/docs/examples/to_bson.cpp +++ b/docs/examples/to_bson.cpp @@ -3,6 +3,7 @@ #include using json = nlohmann::json; +using namespace nlohmann::literals; int main() { diff --git a/docs/examples/to_cbor.cpp b/docs/examples/to_cbor.cpp index 3d85deb5a..3d5e04150 100644 --- a/docs/examples/to_cbor.cpp +++ b/docs/examples/to_cbor.cpp @@ -3,6 +3,7 @@ #include using json = nlohmann::json; +using namespace nlohmann::literals; int main() { diff --git a/docs/examples/to_msgpack.cpp b/docs/examples/to_msgpack.cpp index 76bb22f14..b29ae8c7c 100644 --- a/docs/examples/to_msgpack.cpp +++ b/docs/examples/to_msgpack.cpp @@ -3,6 +3,7 @@ #include using json = nlohmann::json; +using namespace nlohmann::literals; int main() { diff --git a/docs/examples/to_ubjson.cpp b/docs/examples/to_ubjson.cpp index 2329cdd05..fd267a85a 100644 --- a/docs/examples/to_ubjson.cpp +++ b/docs/examples/to_ubjson.cpp @@ -3,6 +3,7 @@ #include using json = nlohmann::json; +using namespace nlohmann::literals; // function to print UBJSON's diagnostic format void print_byte(uint8_t byte) diff --git a/docs/examples/update.cpp b/docs/examples/update.cpp index 8f8b3bf8e..ff94b67fa 100644 --- a/docs/examples/update.cpp +++ b/docs/examples/update.cpp @@ -3,6 +3,7 @@ #include using json = nlohmann::json; +using namespace nlohmann::literals; int main() { diff --git a/docs/examples/update__range.cpp b/docs/examples/update__range.cpp index 98a390429..5b4385046 100644 --- a/docs/examples/update__range.cpp +++ b/docs/examples/update__range.cpp @@ -3,6 +3,7 @@ #include using json = nlohmann::json; +using namespace nlohmann::literals; int main() { diff --git a/docs/examples/value__json_ptr.cpp b/docs/examples/value__json_ptr.cpp index f25b7736a..d866ef076 100644 --- a/docs/examples/value__json_ptr.cpp +++ b/docs/examples/value__json_ptr.cpp @@ -2,6 +2,7 @@ #include using json = nlohmann::json; +using namespace nlohmann::literals; int main() {