[llvm-bugs] [Bug 42241] New: variadic templates as template-template parameter

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Jun 11 18:27:28 PDT 2019


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

            Bug ID: 42241
           Summary: variadic templates as template-template parameter
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C++11
          Assignee: unassignedclangbugs at nondot.org
          Reporter: zhonghao at pku.org.cn
                CC: blitzrakete at gmail.com, dgregor at apple.com,
                    erik.pilkington at gmail.com, llvm-bugs at lists.llvm.org,
                    richard-llvm at metafoo.co.uk

My clang is 9.0.0, and the code is:

 template<template<typename T = int, typename U> class C> struct X;

clang accepts the code, but gcc rejects it:

 error: no default argument for ā€˜Uā€™
    1 |  template<template<typename T = int, typename U> class C> struct X;
      |                                                        ^


Both compilers reject a similar code sample:

template<template<typename... T, typename = T> class U> struct A
{
  template<int> U<int> foo();
};

-- 
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/20190612/269d9f0d/attachment.html>


More information about the llvm-bugs mailing list