[Bug c++/66686] New: Instantiation of dependent template template parameter with non-dependent template rejected
ppalka at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri Jun 26 21:50:00 GMT 2015
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?
More information about the Gcc-bugs
mailing list