This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/77575] New: Bogus error when alias template yielding a reference type used as template template argument
- From: "rs2740 at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 12 Sep 2016 23:48:12 +0000
- Subject: [Bug c++/77575] New: Bogus error when alias template yielding a reference type used as template template argument
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77575
Bug ID: 77575
Summary: Bogus error when alias template yielding a reference
type used as template template argument
Product: gcc
Version: 7.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: rs2740 at gmail dot com
Target Milestone: ---
Reduced from http://stackoverflow.com/q/39460120/2756719:
template<template <class> class> struct meow {};
template<class T> using kitty = T&;
meow<kitty> u;
results in the following bogus error:
prog.cc: In instantiation of 'struct meow<kitty>':
prog.cc:4:13: required from here
prog.cc:1:46: error: type/value mismatch at argument 1 in template parameter
list for 'template<template<class> class<template-parameter-1-1> > struct meow'
template<template <class> class> struct meow {};
^
prog.cc:1:46: note: expected a class template, got 'kitty'
prog.cc:1:46: error: type/value mismatch at argument 1 in template parameter
list for 'meow< <template-parameter-1-1> >::meow'
prog.cc:1:46: note: expected a class template, got 'kitty'
It compiles fine if 'kitty' is instead defined as T or T*.