[llvm-bugs] [Bug 46684] New: Constraints and explicit template instantiation

via llvm-bugs llvm-bugs at lists.llvm.org
Sat Jul 11 01:46:50 PDT 2020


            Bug ID: 46684
           Summary: Constraints and explicit template instantiation
           Product: clang
           Version: 10.0
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C++2a
          Assignee: unassignedclangbugs at nondot.org
          Reporter: kaba at hilvi.org
                CC: blitzrakete at gmail.com, erik.pilkington at gmail.com,
                    llvm-bugs at lists.llvm.org, richard-llvm at metafoo.co.uk

The following code does not compile in all of clang 10.0.0, gcc 10.1, and msvc

    template <int N>
    struct A {
        void g() requires (N == 3) {}
        void f() requires (N == 3) { g(); }

    template struct A<2>;

The error is "error : invalid reference to function 'g': constraints not

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/20200711/6e978efd/attachment.html>

More information about the llvm-bugs mailing list