This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/65396] Function template default template arguments not merged
- From: "arthur.j.odwyer at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sun, 14 Aug 2016 18:46:02 +0000
- Subject: [Bug c++/65396] Function template default template arguments not merged
- Authentication-results: sourceware.org; auth=none
- Auto-submitted: auto-generated
- References: <bug-65396-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65396
Arthur O'Dwyer <arthur.j.odwyer at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |arthur.j.odwyer at gmail dot com
--- Comment #2 from Arthur O'Dwyer <arthur.j.odwyer at gmail dot com> ---
FWIW, I just ran into the same thing and confirmed (via Wandbox) that the bug
is there in every GCC up to 7.0.0 (and no Clang, back as far as Clang 3.0).
This is the test case I was using. There is only one function template "f", and
both of its template parameters have defaults by the time it's called:
-------------------
#include <stdio.h>
template<class T1, class T2 = int> void f();
template<class T1 = int, class T2> void f();
template<class T1, class T2> void f() {
puts(__PRETTY_FUNCTION__);
}
int main() {
f();
}