This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: template specialization, is this valid C++?
- From: Jonathan Wakely <jwakely dot gcc at gmail dot com>
- To: andre maute <andre dot maute at gmx dot de>
- Cc: gcc-help at gcc dot gnu dot org
- Date: Tue, 12 Nov 2013 18:27:24 +0000
- Subject: Re: template specialization, is this valid C++?
- Authentication-results: sourceware.org; auth=none
- References: <5282641F dot 4030409 at gmx dot de>
On 12 November 2013 17:23, andre maute wrote:
> gcc version 4.7.2 20121109 (Red Hat 4.7.2-8) (GCC)
> compiles the following code under Fedora.
>
> My question is,
> if the omitting of the second template parameter of f,
> is valid C++?
This is a general C++ question, not specific to GCC, so there are
better places to ask than here.
However the answer is yes, the second template argument is deduced
from the function argument, which has type double.