This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/85124] New: template template parameter is printed incorrectly in the error message
- From: "ensadc at mailnesia dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 29 Mar 2018 20:56:44 +0000
- Subject: [Bug c++/85124] New: template template parameter is printed incorrectly in the error message
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85124
Bug ID: 85124
Summary: template template parameter is printed incorrectly in
the error message
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: ensadc at mailnesia dot com
Target Milestone: ---
https://wandbox.org/permlink/0ir0hnoy5jeX9KLT
----
template<class T> using ref = T&;
template<class A>
struct X {
template<template<class> class F>
using apply = F<void>;
};
X<int>::apply<ref> a;
----
prog.cc: In substitution of 'template<class T> using ref = T& [with T = void]':
prog.cc:6:26: required by substitution of 'template<class A>
template<template<template<class> class F> template<class A> template<class>
class F> using apply = F<void> [with F = ref; A = int]'
prog.cc:9:18: required from here
prog.cc:1:33: error: forming reference to void
template<class T> using ref = T&;
^
----
In the second line of the error message ("required by substitution of ..."), it
should be just `template<class> class F`, not `template<template<class> class
F> template<class A> template<class> class F` (i.e. there should be only one
template-head for the template template parameter, not three).
Just to clarify, it's irrelevant what the actual error is.