From 3479161504677566008
X-Google-Thread: f78e5,c9a289c55d59e43d
X-Google-Attributes: gidf78e5,public
X-Google-Language: ENGLISH,ASCII-7-bit
Path: g2news2.google.com!news1.google.com!news4.google.com!news.glorb.com!peer1.news.newnet.co.uk!194.159.246.34.MISMATCH!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: Mon, 17 Jul 2006 02:32:33 GMT
Organization: Texas A&M University, College Station, Texas
Lines: 32
Sender: mail2news@demon.net
Approved: fjh@cs.mu.oz.au (Fergus Henderson , moderator of comp.std.c++)
Message-ID: <Pine.GSO.4.58.0607162111540.16205@sun>
References: <1152697717.720355.314370@35g2000cwc.googlegroups.com>
 <1152726032.559269.324790@75g2000cwc.googlegroups.com>
NNTP-Posting-Host: news.news.demon.net
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: news.demon.co.uk 1153103561 20947 158.152.254.254 (17 Jul 2006 02:32:41 GMT)
X-Complaints-To: abuse@demon.net
NNTP-Posting-Date: Mon, 17 Jul 2006 02:32: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 k6H2WXHH028955;
	Mon, 17 Jul 2006 12:32:33 +1000 (EST)
X-Path: comp-std-cpp-robomod!not-for-mail
X-NNTP-Posting-Date: 17 Jul 2006 02:13:56 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++:2761

On Wed, 12 Jul 2006, Richard Smith wrote:

| Regarding the syntax, there isn't anything obvious that fits with C++
| idea of templates.  The name of the type needs to be in scope when the
| non-type template parameter is declared, so
|
|   template <typename T, T Min, T Max>
|   struct foo {};

How about

    template<auto Min, auto Max>
      struct foo { };

?

It does not say exactly that Min and Max have the same type, but that
is a minor point.  One would gain in clarity by removing the noise
"typename T".

-- 
                                                        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                      ]



