[llvm-bugs] [Bug 50693] New: `requires` out-of-line definition using typedef not accepted

via llvm-bugs llvm-bugs at lists.llvm.org
Sat Jun 12 03:03:52 PDT 2021


https://bugs.llvm.org/show_bug.cgi?id=50693

            Bug ID: 50693
           Summary: `requires` out-of-line definition using typedef not
                    accepted
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C++2a
          Assignee: unassignedclangbugs at nondot.org
          Reporter: koncek.marian at gmail.com
                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
(Godbolt link https://godbolt.org/z/d756fhMTh)
is not accepted by clang but is accepted by GCC:

#include <type_traits>

template<typename T>
struct S
{
    using t = T;

    void f()
    requires(std::is_copy_constructible_v<t>);
};

template<typename T>
auto S<T>::f() -> void
// requires(std::is_copy_constructible_v<T>)
requires(std::is_copy_constructible_v<typename S<T>::t>)
{
}

int main()
{
}

-- 
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/20210612/1f68c210/attachment.html>


More information about the llvm-bugs mailing list