[llvm-bugs] [Bug 37842] New: Partial ordering of non-type template parameters with dependent types
via llvm-bugs
llvm-bugs at lists.llvm.org
Tue Jun 19 00:17:23 PDT 2018
https://bugs.llvm.org/show_bug.cgi?id=37842
Bug ID: 37842
Summary: Partial ordering of non-type template parameters with
dependent types
Product: clang
Version: unspecified
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: C++
Assignee: unassignedclangbugs at nondot.org
Reporter: zhonghao at pku.org.cn
CC: dgregor at apple.com, llvm-bugs at lists.llvm.org
The code is as follow:
template <class T>
struct identity
{
typedef T type;
};
template <class T, typename T::type A>
struct foo {};
template <class T, T A>
struct foo<identity<T>, A> {};
int main()
{
foo<identity<int>,0> bar; // error here
}
clang++ accepts the code, but g++ rejects it with error messages. Initially, I
believe that this is a bug in g++, and reported the problem
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86193
However, the programmers of g++ believe that they are correct, and clang++
shall not accept the code. Would you please check this problem, and fix it if
it is really a bug in clang?
--
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/20180619/726082ee/attachment.html>
More information about the llvm-bugs
mailing list