[Bug c++/14971] better error message for partial specialization of function templates requested
tjic at tjic dot com
gcc-bugzilla@gcc.gnu.org
Thu Apr 15 23:34:00 GMT 2004
------- Additional Comments From tjic at tjic dot com 2004-04-15 23:04 -------
Subject: Re: better error message for partial specialization of function templates requested
> Date: 15 Apr 2004 22:50:30 -0000
> From: "bangerth at dealii dot org" <gcc-bugzilla@gcc.gnu.org>
>
>
> ------- Additional Comments From bangerth at dealii dot org 2004-04-15 22:50 -------
> Confirmed. I assume you had something like this in mind:
> ------------------
> template <typename U, typename V>
> void f(U,V) {};
>
> template <typename U>
> void f<U,int> (U, int) {};
> ------------------
> g/x> /home/bangerth/bin/gcc-3.4-pre/bin/c++ -c x.cc
> x.cc:5: error: partial specialization `f<U, int>' of function template
Exactly.
> Even though I consider myself an experienced C++ user, I have run into
> this before as well, and a description of _why_ this is an error (because
> the standard says it is illegal) would certainly be helpful. I suggest that
> something like
> partial specializations `...'; partial specializations of function
> templates are not allowed in C++
> would be a better wording.
A fine improvement!
Thanks,
TJIC
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14971
More information about the Gcc-bugs
mailing list