[Bug c++/82308] [C++17] deduction of template arguments results in internal compiler error

rguenth at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon Sep 25 08:05:00 GMT 2017


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

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
I get with GCC 7.2

> /space/rguenther/install/gcc-7.2/bin/g++ -S t.C
t.C: In function ‘int main()’:
t.C:18:16: error: missing template arguments before ‘d’
           X    d{a}; //cannot be deduced
                ^

and clang complains:

> clang++ -S t.C -std=c++14
t.C:18:11: error: use of class template 'X' requires template arguments
          X    d{a}; //cannot be deduced
          ^
t.C:4:7: note: template is declared here
class X {
      ^
1 error generated.


More information about the Gcc-bugs mailing list