From 4923361206681578420
X-Google-Thread: 7894ca11fe,40de2bc986604261
X-Google-Attributes: gid7894ca11fe,public,usenet
X-Google-NewGroupId: yes
X-Google-Language: ENGLISH,ASCII-7-bit
Path: g2news2.google.com!news1.google.com!Xl.tags.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local2.nntp.dca.giganews.com!news.giganews.com.POSTED!not-for-mail
NNTP-Posting-Date: Sat, 03 Oct 2009 20:50:08 -0500
Return-Path: <cppmods@ruralroute.cs.rpi.edu>
To: (Usenet)
From: Paul Bibbings <paul_bibbings@googlemail.com>
Newsgroups: comp.std.c++
Subject: Re: Templates as default arguments
Organization: bytemine - http://www.bytemine.net
Sender: cppmods@cs.rpi.edu
Approved: james.dennett@gmail.com
Message-ID: <ha67su$h82$1@news.bytemine.net>
References: <a9f9b3ad-96c5-4ad9-aca0-c50ec493b09e@z24g2000yqb.googlegroups.com>
Reply-To: paul_bibbings@googlemail.com
Content-Type: text/plain; charset=ISO-8859-1
X-Original-Date: Sat, 03 Oct 2009 02:03:25 +0100
X-Submission-Address: std-c++@netlab.cs.rpi.edu
Date: Sat,  3 Oct 2009 20:45:32 CST
Lines: 30
X-Usenet-Provider: http://www.giganews.com
X-Trace: sv3-kEiFpN4A2rFBEqi64TQPc3SevganuMIqE1I8u5QlslSPuzmEc/c8GfMGxDoJqFn9vklyqUOeBxPmrla!g0q5pMELnX3RBYhxFv3eZVhoCKYRzaimt4+AbEXneizHM5khiOvyFuPo
X-Complaints-To: abuse@giganews.com
X-DMCA-Notifications: http://www.giganews.com/info/dmca.html
X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers
X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly
X-Postfilter: 1.3.40
Xref: g2news2.google.com comp.std.c++:1422

dps wrote:
> Hi,
>
> I have the following situation:
>
> template<typename T, int i> class A
> {
>      A(){}
> };
>
> class B
> {
> public:
>      B(A<double,3> arg=A<double,3>()){}
> }

Aside from the fact that in your 'pseudo-code' you declare the constructor of A
to be private, on correcting this I have no problems getting this to compile
with gcc-4.4.1.

Regards

Paul Bibbings

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



