https://bugs.llvm.org/show_bug.cgi?id=47386

            Bug ID: 47386
           Summary: ICE when not unpacking variadic template into concept
           Product: clang
           Version: 10.0
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C++2a
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected],
                    [email protected], [email protected]

Compiling this causes an ICE:


template <typename... Ts>
concept Foo = true;

template <typename... Ts> requires Foo<Ts /* ... */>
class Bar {};

Bar<int> bar;


GCC 10.2.0 fails gracefully with an error, stating that the parameter pack
isn't expanded.


$ g++ -std=c++2a -c foo.cc 
foo.cc:4:36: error: parameter packs not expanded with '...':
    4 | template <typename... Ts> requires Foo<Ts /* ... */>
      |                                    ^~~~~~~~~~~~~~~~~
foo.cc:4:36: note:         'Ts'
foo.cc:7:8: error: template constraint failure for 'template<class ... Ts> 
requires  <erroneous-expression> class Bar'
    7 | Bar<int> bar;
      |        ^
foo.cc:7:8: note: constraints not satisfied

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to