From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14567 invoked by alias); 28 Mar 2002 03:56:13 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 14512 invoked by uid 71); 28 Mar 2002 03:56:11 -0000 Resent-Date: 28 Mar 2002 03:56:10 -0000 Resent-Message-ID: <20020328035610.14511.qmail@sources.redhat.com> Resent-From: gcc-gnats@gcc.gnu.org (GNATS Filer) Resent-To: nobody@gcc.gnu.org Resent-Cc: gcc-prs@gcc.gnu.org, gcc-bugs@gcc.gnu.org Resent-Reply-To: gcc-gnats@gcc.gnu.org, f_ker@yahoo.co.uk Received:(qmail 30485 invoked by uid 61); 28 Mar 2002 03:50:56 -0000 Message-Id:<20020328035056.30482.qmail@sources.redhat.com> Date: Wed, 27 Mar 2002 19:56:00 -0000 From: f_ker@yahoo.co.uk Reply-To: f_ker@yahoo.co.uk To: gcc-gnats@gcc.gnu.org X-Send-Pr-Version:gnatsweb-2.9.3 (1.1.1.1.2.31) Subject: c++/6078: Template params in functions not picking up types correctly from arguments X-SW-Source: 2002-03/txt/msg01070.txt.bz2 List-Id: >Number: 6078 >Category: c++ >Synopsis: Template params in functions not picking up types correctly from arguments >Confidential: no >Severity: serious >Priority: high >Responsible: unassigned >State: open >Class: rejects-legal >Submitter-Id: net >Arrival-Date: Wed Mar 27 19:56:09 PST 2002 >Closed-Date: >Last-Modified: >Originator: f_ker@yahoo.co.uk >Release: gcc 3.0.4 >Organization: >Environment: i686-pc-linux-gnu >Description: A function with templatised arguments, when called, should automatically resolve the template arguments from the arguments of the function call. In this special case, it doesn't. >How-To-Repeat: volatile int* ret_func() {return (volatile int*)0xdeadbeef;} template struct D { template void a_func(T1& t1, const T2& t2) { t1[i] = t2[i]; } }; int data[16]; int main() { D<0>::a_func(ret_func(), data); } This gives an error message that gives a candidate identical to the called function! >Fix: >Release-Note: >Audit-Trail: >Unformatted: