[llvm-bugs] [Bug 31263] New: specialization of template template parameter considered ill-formed if parameter is an alias template

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Dec 5 02:39:51 PST 2016


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

            Bug ID: 31263
           Summary: specialization of template template parameter
                    considered ill-formed if parameter is an alias
                    template
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
          Assignee: unassignedclangbugs at nondot.org
          Reporter: kretz at kde.org
                CC: dgregor at apple.com, llvm-bugs at lists.llvm.org
    Classification: Unclassified

Testcase:

```
template <template <typename...> class T> struct Template {                     
    template <typename... Us> using type = T<Us...>;                            
};

template <class T> struct X { static constexpr T value = T(); };
template <class T> using alias = X<T>;

int main() { return Template<alias>::type<int>::value; }
```

GCC and EDG accept the code.
Clang accepts the code if `X` is used directly or if `alias` is declared as
`template <class... Ts> using alias = X<Ts...>`.

-- 
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/20161205/dcffaa06/attachment-0001.html>


More information about the llvm-bugs mailing list