From 2836298548789640170
X-Google-Thread: f78e5,c9a289c55d59e43d
X-Google-Attributes: gidf78e5,public
X-Google-Language: ENGLISH,ASCII-7-bit
Path: g2news2.google.com!news3.google.com!news.glorb.com!newsgate.cistron.nl!xs4all!news.tele.dk!news.tele.dk!small.news.tele.dk!lnewsinpeer00.lnd.ops.eu.uu.net!emea.uu.net!peer-uk.news.demon.net!kibo.news.demon.net!news.demon.co.uk!demon!stump.algebra.com!devnull
From: gdr@cs.tamu.edu (Gabriel Dos Reis)
Newsgroups: comp.std.c++
Subject: Re: non-type template parameter in the new std.
Date: Tue, 18 Jul 2006 15:20:35 GMT
Organization: Texas A&M University, College Station, Texas
Lines: 29
Sender: mail2news@demon.net
Approved: fjh@cs.mu.oz.au (Fergus Henderson , moderator of comp.std.c++)
Message-ID: <Pine.GSO.4.58.0607180816420.8995@sun>
References: <1152726032.559269.324790@75g2000cwc.googlegroups.com>
 <memo.20060718092048.676A@brangdon.cix.compulink.co.uk>
NNTP-Posting-Host: news.news.demon.net
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: news.demon.co.uk 1153236041 156 158.152.254.254 (18 Jul 2006 15:20:41 GMT)
X-Complaints-To: abuse@demon.net
NNTP-Posting-Date: Tue, 18 Jul 2006 15:20:41 +0000 (UTC)
X-Original-To: std-c++@mailman.ucar.edu
X-Robomod: STUMP, ichudov@algebra.com (Igor Chudov)
X-Virus-Scanned: amavisd-new at csse.unimelb.edu.au
X-Received: (from fjh@localhost)
	by mulga.csse.unimelb.edu.au (8.13.6+Sun/8.13.6/Submit) id k6IFKZHh016093;
	Wed, 19 Jul 2006 01:20:35 +1000 (EST)
X-Path: comp-std-cpp-robomod!not-for-mail
X-NNTP-Posting-Date: 18 Jul 2006 13:17:22 GMT
X-Delivered-To: std-c++@mailman.ucar.edu
X-Authentication-Warning: mulga.csse.unimelb.edu.au: fjh set sender to devnull@stump.algebra.com using -f
X-Newsgroups: comp.std.c++
Xref: g2news2.google.com comp.std.c++:2838

On Tue, 18 Jul 2006, Dave Harris wrote:

| Actually, as I understand it the problem is one of type checking. Given:
|
|     template <double v> struct X {};
|
|     void func( X<0.3333> ) {}
|     void func( X<1.0/3.0> ) {}
|
| is this two definitions of the same function that violates the
| one-definition rule, or are there two functions that take arguments of
| different types? The answer depends on the precision of the floating
| point, so we can't say whether the program is type-correct without knowing
| more about the implementation than we should.

Isn't the same reasoning true for integer types too?

-- 
                                                        Gabriel Dos Reis
                                                         gdr@cs.tamu.edu
	Texas A&M University -- Department of Computer Science
	301, Bright Building -- College Station, TX 77843-3112

---
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://www.comeaucomputing.com/csc/faq.html                      ]



