This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/66686] New: Instantiation of dependent template template parameter with non-dependent template rejected


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?

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]