https://bugs.llvm.org/show_bug.cgi?id=45204
Bug ID: 45204
Summary: concepts: constrained member functions illegally
instantiated during explicit class template
instantiation
Product: clang
Version: 10.0
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: C++2a
Assignee: unassignedclangb...@nondot.org
Reporter: akrze...@gmail.com
CC: blitzrak...@gmail.com, erik.pilking...@gmail.com,
llvm-bugs@lists.llvm.org, richard-l...@metafoo.co.uk
The following correct C++20 program fails to compile in clang.
```
template <typename T>
concept has_a = requires(T v) { v.a(); };
template<typename T>
struct X
{
void fun(T) {}
void gun(T v) requires has_a<T> { v.a(); }
};
template struct X<int>;
```
member function `gun()` is instantiated which is a bug according to
http://eel.is/c++draft/temp.explicit#11
This works in the old experimental implementation of concepts in Clang by Saar
Raz: https://godbolt.org/z/K4SaCm
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs