https://bugs.llvm.org/show_bug.cgi?id=48020
Bug ID: 48020
Summary: Defining constrained member function out of line is
rejected
Product: clang
Version: trunk
Hardware: PC
OS: Windows NT
Status: NEW
Severity: enhancement
Priority: P
Component: C++2a
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected],
[email protected], [email protected]
>From StackOverflow (https://stackoverflow.com/q/64601583/2069064):
template <typename> concept C = true;
template <typename T>
struct Foo { };
template<typename T>
requires C<T>
struct Foo<T> {
static void bar();
};
template<typename T>
requires C<T>
void Foo<T>::bar() { }
int main() {
Foo<int>::bar();
}
clang 11 rejects this program with:
<source>:13:10: error: requires clause differs in template redeclaration
requires C<T>
^
<source>:3:1: note: previous template declaration is here
template <typename T>
^
--
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