From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30737 invoked by alias); 12 Nov 2013 18:27:36 -0000 Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org Received: (qmail 30724 invoked by uid 89); 12 Nov 2013 18:27:35 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.0 required=5.0 tests=AWL,BAYES_50,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,RDNS_NONE,SPF_PASS autolearn=no version=3.3.2 X-HELO: mail-lb0-f178.google.com Received: from Unknown (HELO mail-lb0-f178.google.com) (209.85.217.178) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Tue, 12 Nov 2013 18:27:34 +0000 Received: by mail-lb0-f178.google.com with SMTP id y6so95664lbh.9 for ; Tue, 12 Nov 2013 10:27:24 -0800 (PST) MIME-Version: 1.0 X-Received: by 10.152.140.7 with SMTP id rc7mr28737971lab.12.1384280844705; Tue, 12 Nov 2013 10:27:24 -0800 (PST) Received: by 10.112.173.195 with HTTP; Tue, 12 Nov 2013 10:27:24 -0800 (PST) In-Reply-To: <5282641F.4030409@gmx.de> References: <5282641F.4030409@gmx.de> Date: Tue, 12 Nov 2013 18:27:00 -0000 Message-ID: Subject: Re: template specialization, is this valid C++? From: Jonathan Wakely To: andre maute Cc: gcc-help@gcc.gnu.org Content-Type: text/plain; charset=ISO-8859-1 X-IsSubscribed: yes X-SW-Source: 2013-11/txt/msg00078.txt.bz2 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.