[llvm-bugs] [Bug 47386] New: ICE when not unpacking variadic template into concept
via llvm-bugs
llvm-bugs at lists.llvm.org
Tue Sep 1 07:49:22 PDT 2020
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: unassignedclangbugs at nondot.org
Reporter: matt+llvm at offtopica.uk
CC: blitzrakete at gmail.com, erik.pilkington at gmail.com,
llvm-bugs at lists.llvm.org, richard-llvm at metafoo.co.uk
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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20200901/e60f879e/attachment.html>
More information about the llvm-bugs
mailing list