From e1ed7fbf93c618c588cb8e3872dc2777502fc736 Mon Sep 17 00:00:00 2001 From: Niels Lohmann Date: Sun, 8 May 2022 17:13:48 +0200 Subject: [PATCH] :fire: remove example for deprecated code --- docs/examples/iterator_wrapper.cpp | 29 --------------------------- docs/examples/iterator_wrapper.output | 7 ------- 2 files changed, 36 deletions(-) delete mode 100644 docs/examples/iterator_wrapper.cpp delete mode 100644 docs/examples/iterator_wrapper.output diff --git a/docs/examples/iterator_wrapper.cpp b/docs/examples/iterator_wrapper.cpp deleted file mode 100644 index 84d37254b..000000000 --- a/docs/examples/iterator_wrapper.cpp +++ /dev/null @@ -1,29 +0,0 @@ -#include -#include - -using json = nlohmann::json; - -int main() -{ - // create JSON values - json j_object = {{"one", 1}, {"two", 2}}; - json j_array = {1, 2, 4, 8, 16}; - - ////////////////////////////////////////////////////////////////////////// - // The static function iterator_wrapper was deprecated in version 3.1.0 - // and will be removed in version 4.0.0. Please replace all occurrences - // of iterator_wrapper(j) with j.items(). - ////////////////////////////////////////////////////////////////////////// - - // example for an object - for (auto& x : json::iterator_wrapper(j_object)) - { - std::cout << "key: " << x.key() << ", value: " << x.value() << '\n'; - } - - // example for an array - for (auto& x : json::iterator_wrapper(j_array)) - { - std::cout << "key: " << x.key() << ", value: " << x.value() << '\n'; - } -} diff --git a/docs/examples/iterator_wrapper.output b/docs/examples/iterator_wrapper.output deleted file mode 100644 index 89b09f524..000000000 --- a/docs/examples/iterator_wrapper.output +++ /dev/null @@ -1,7 +0,0 @@ -key: one, value: 1 -key: two, value: 2 -key: 0, value: 1 -key: 1, value: 2 -key: 2, value: 4 -key: 3, value: 8 -key: 4, value: 16