Open
Description
the following code:
a : std::map<u32, std::string> = ();
// populate map
for a do (k,v) {
... do stuff ...
}
I also tried:
for a do ([k, v]) {
for a do ([k, v]: ) {
for a do (k:, v:) {
for a do ([k:, v:_]) {
for a do ((k, v)) {
the versions with brakets complain about requiring a parameter after
the versions without complain about the comma after the parameter
Steps to reproduce the behavior:
- Sample code - distilled down to minimal essentials please
provided above - Command lines including which C++ compiler you are using
cppfront file.cpp2
g++-13 (though it doesn't get to it) - Expected result - what you expected to happen
be able to destructure something in a for loop - Actual result/error
there's no intuitive syntax to do this as of yet