This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/66686] New: Instantiation of dependent template template parameter with non-dependent template rejected
- From: "ppalka at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 26 Jun 2015 21:50:16 +0000
- Subject: [Bug c++/66686] New: Instantiation of dependent template template parameter with non-dependent template rejected
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66686
Bug ID: 66686
Summary: Instantiation of dependent template template parameter
with non-dependent template rejected
Product: gcc
Version: 5.1.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: ppalka at gcc dot gnu.org
Target Milestone: ---
The following code should probably compile:
template <template <int> class>
struct A { };
template <int>
struct Y { };
template <class A, class B, template <template <B> class Z> class C>
struct X
{
C<Y> a;
};
X<int, int, A> a;
With GCC 5.1 it does not:
foo.cc:10:8: error: type/value mismatch at argument 1 in template parameter
list for âtemplate<template<B <anonymous> > class Z> class Câ
C<Y> a;
^
foo.cc:10:8: error: expected a template of type âtemplate<B <anonymous> >
class Zâ, got âtemplate<int <anonymous> > struct Yâ
Is this valid code in the first place?