Skip to content

Nonexistent variable used, with unbalanced parentheses #20

@tavianator

Description

@tavianator

This example on cppinsights.io:

#include <map>

int main()
{
    std::map<int, int> map{{1, 2}};
    auto [key, value] = *map.begin();
}

apparently desugars to

#include <map>

int main()
{
    std::map<int, int> map{ std::initializer_list<std::pair<const int, int> >{ std::pair<const int, int>(1, 2) } };
    std::pair<const int, int> __operator6 = std::pair<const int, int>(map.begin().operator*());
    std::tuple_element<0, std::pair<const int, int> >::type&& key = std::get<0ul>(__operator6);
    std::tuple_element<1, std::pair<const int, int> >::type&& value = std::get<1ul>(__opemap.begin().operator*() 
}

But __opemap.begin().operator*() should presumably be __operator6)

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions