From -5884448609811368568
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f78e5,748275a34e899a44,start
X-Google-Attributes: gidf78e5,public
X-Google-ArrivalTime: 2004-01-10 09:14:42 PST
Path: archiver1.google.com!news2.google.com!news.maxwell.syr.edu!kibo.news.demon.net!mutlu.news.demon.net!demon!mail2news.demon.co.uk!devnull
From: lgalfaso@fd.com.ar (=?iso-8859-1?Q?Lucas_Galfas=F3?=)
Newsgroups: comp.std.c++
Subject: template constructor
Date: Sat, 10 Jan 2004 17:14:41 +0000 (UTC)
Lines: 33
Approved: fjh@cs.mu.oz.au (Fergus Henderson , moderator of comp.std.c++)
Message-ID: <000001c3d79b$6b007280$f37bfea9@lucasxp1>
Mime-Version: 1.0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Trace: mail2news.demon.co.uk 1073754881 24954 10.0.0.1 (10 Jan 2004 17:14:41 GMT)
X-Complaints-To: abuse@demon.net
NNTP-Posting-Date: Sat, 10 Jan 2004 17:14:41 +0000 (UTC)
X-Received: from mulga.cs.mu.oz.au ([128.250.1.22])
	by news.demon.co.uk with esmtp (Exim 4.12)
	id 1AfMh6-0006UL-00
	for mail2news@news.news.demon.net; Sat, 10 Jan 2004 17:14:41 +0000
X-Received: from mulga.cs.mu.OZ.AU (localhost [127.0.0.1]) by mulga.cs.mu.OZ.AU with ESMTP
	id i0AHEciD016387; Sun, 11 Jan 2004 04:14:38 +1100 (EST)
X-Received: (from fjh@localhost)
	by mulga.cs.mu.OZ.AU (8.12.10+Sun/8.12.9/Submit) id i0AHEbkX016368;
	Sun, 11 Jan 2004 04:14:37 +1100 (EST)
X-Authentication-Warning: mulga.cs.mu.OZ.AU: fjh set sender to devnull@stump.algebra.com using -f
X-Path: comp-std-cpp-robomod!not-for-mail
X-Robomod: STUMP, ichudov@algebra.com (Igor Chudov)
X-Delivered-To: std-c++@ucar.edu
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
X-Importance: Normal
X-Spam-Checker-Version: SpamAssassin 2.60-mulga_r1 (1.212-2003-09-23-exp) on 
	mulga.cs.mu.OZ.AU
X-Spam-Level: 
X-Spam-Status: No, hits=0.0 required=5.2 tests=none autolearn=no 
	version=2.60-mulga_r1
X-Newsgroups: comp.std.c++
Xref: archiver1.google.com comp.std.c++:829

Hi everyone, I do know if this was an expected feature (restriction) of the
standard, but
1) You can declare a class with a template constructor that can take a
non-type template parameter.
2) You cannot instantiate it.

Ie

struct foo {
  template <bool in>
  foo () { }
};

int main ()
{
  foo b1; // no default constructor (and no workaround)
  return 0;
}

Lucas/

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.555 / Virus Database: 347 - Release Date: 12/23/2003
 

---
[ 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.jamesd.demon.co.uk/csc/faq.html                       ]



