MESSAGE
DATE | 2011-05-24 |
FROM | Ruben Safir
|
SUBJECT | Re: [NYLXS - HANGOUT] [ruben@mrbrklyn.com: Re:
|
From owner-hangout-outgoing-at-mrbrklyn.com Tue May 24 13:31:50 2011 Return-Path: X-Original-To: archive-at-mrbrklyn.com Delivered-To: archive-at-mrbrklyn.com Received: by www2.mrbrklyn.com (Postfix) id A4454100B22; Tue, 24 May 2011 13:31:50 -0400 (EDT) Delivered-To: hangout-outgoing-at-www2.mrbrklyn.com Received: by www2.mrbrklyn.com (Postfix, from userid 28) id 9325F100B25; Tue, 24 May 2011 13:31:50 -0400 (EDT) Delivered-To: hangout-at-nylxs.com Received: from mailbackend.panix.com (mailbackend.panix.com [166.84.1.89]) by www2.mrbrklyn.com (Postfix) with ESMTP id 520E4100B22 for ; Tue, 24 May 2011 13:31:50 -0400 (EDT) Received: from panix5.panix.com (panix5.panix.com [166.84.1.5]) by mailbackend.panix.com (Postfix) with ESMTP id 02D7732520 for ; Tue, 24 May 2011 13:32:12 -0400 (EDT) Received: by panix5.panix.com (Postfix, from userid 20529) id EA8F42424F; Tue, 24 May 2011 13:32:11 -0400 (EDT) Date: Tue, 24 May 2011 13:32:11 -0400 From: Ruben Safir To: hangout-at-nylxs.com Subject: Re: [NYLXS - HANGOUT] [ruben-at-mrbrklyn.com: Re: [mrbrklyn-at-panix.com: Template Argument type deterination]] Message-ID: <20110524173211.GC20420-at-panix.com> References: <20110524172525.GC21131-at-panix.com> <20110524173038.GA20420-at-panix.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20110524173038.GA20420-at-panix.com> User-Agent: Mutt/1.5.20 (2009-06-14) Sender: owner-hangout-at-mrbrklyn.com Precedence: bulk Reply-To: hangout-at-mrbrklyn.com
Path: reader1.panix.com!panix!news.linkpendium.com!news.linkpendium.com!feeder.erje.net!news.ett.com.ua!not-for-mail From: "Balog Pal" Newsgroups: comp.lang.c++ Subject: Re: Template argument determination Date: Tue, 24 May 2011 17:33:46 +0200 Organization: ETT newsserver Lines: 17 Message-ID: References:
NNTP-Posting-Host: bc240436.catv.pool.telekom.hu Mime-Version: 1.0 Content-Type: text/plain; format=flowed; charset="UTF-8"; reply-type=original Content-Transfer-Encoding: 7bit X-Complaints-To: usenet-at-news.ett.com.ua X-Notice: Filtered by postfilter v. 0.6.1 X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 Xref: panix comp.lang.c++:1085261
"Ruben Safir" > why does this fail to compile > > template > void test_me(stats::Distribution hello); > > int main ( int argc, char *argv[] ){ > int a = 7; > test_me(a); > > yet this does, with the promotion of the int to a distribution object > test_me(a);
IIRC it is called "non-deduced context". How do you think the compiler could figure the T you meant for a general case?
|
|