[llvm-bugs] [Bug 49224] New: Wrong error "template template argument has different template argument than parameters than its corresponding template template parameter"

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Feb 17 07:54:08 PST 2021


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

            Bug ID: 49224
           Summary: Wrong error "template template argument has different
                    template argument than parameters than its
                    corresponding template template parameter"
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C++17
          Assignee: unassignedclangbugs at nondot.org
          Reporter: gabravier 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

template <class T, class U, class A = int>
struct X {};

template <template <class, class> class T>
struct Y {};

using type = Y<X>;

In C++20 mode, GCC and MSVC build this fine, while Clang complains that
"template template argument has different template argument than parameters
than its corresponding template template parameter"

I believe https://eel.is/c++draft/temp.arg.template#example-2 means this should
work. -frelaxed-template-template-args makes it work, but I don't think that
should be required.

See also Godbolt comparison here: https://godbolt.org/z/oefM73

-- 
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/20210217/39a743e6/attachment-0001.html>


More information about the llvm-bugs mailing list