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: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected],
                    [email protected], [email protected]

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
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to