https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115605

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Oh I think I see how it should be fixed.

The way std::initializer_list is handled is correct:
static tree
listify (tree arg)
{
  tree std_init_list = lookup_qualified_name (std_node, init_list_identifier);
...  

return lookup_template_class (std_init_list, argvec, NULL_TREE,
                                NULL_TREE, tf_warning_or_error);

That is:
```
#include <vector>
void f()
{
        int initializer_list;
        std::vector<int> tt = {0, 1, 2,3};
}
```
Works just fine.

If nobody gets to this soon, I might go and try to fix the use of
lookup_template_class  for those 3 cases to use lookup_qualified_name first.

Reply via email to