-
-
Notifications
You must be signed in to change notification settings - Fork 7.3k
Description
Bug Report
-
What is the issue you have?
Cannot use C++17 structured bindings for iteration -
Please describe the steps to reproduce the issue. Can you provide a small but working code example?
Although this DOES work (taken from the docs):
for (json::iterator it = o.begin(); it != o.end(); ++it) {
std::cout << it.key() << " : " << it.value() << "\n";
}The following DOES NOT work:
for (auto&& [k,v] : o)
std::cout << k << ":" << v << "\n";
-
What is the expected behavior?
It should do the same thing as the traditional iterator implementation -
And what is the actual behavior instead?
Does not compile -
Which compiler and operating system are you using? Is it a supported compiler?
clang++ 6.0 (svn tree) -
Did you use a released version of the library or the version from the
developbranch?
Yes, 3.0.1 -
If you experience a compilation error: can you compile and run the unit tests?
The tests work fine, so no issues there
Feature Request
-
Describe the feature in as much detail as possible.
-
Include sample usage where appropriate.