From 325263644922488352 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f78e5,bfc25674b1a4166f X-Google-Attributes: gidf78e5,public From: "Michael Kochetkov" Subject: Re: templated Copy-Constructor? Date: 2000/04/29 Message-ID: <3909bd3f@news.telekom.ru>#1/1 X-Deja-AN: 616840776 Approved: Fergus Henderson , moderator of comp.std.c++ References: <39099e33$0$22977@businessnews.de.uu.net> X-Priority: 3 X-Authentication-Warning: mulga.cs.mu.OZ.AU: fjh set sender to devnull@stump.algebra.com using -f X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600 X-Complaints-To: abuse@demon.net X-Mail2News-Path: news.demon.net!mulga.cs.mu.oz.au X-Trace: mail2news.demon.co.uk 956939701 mail2news:23325 mail2news mail2news.demon.co.uk X-Robomod: STUMP, ichudov@algebra.com (Igor Chudov) X-MSMail-Priority: Normal Newsgroups: comp.std.c++ 14.5.2/2 -- "A normal (non-template) member function with a given name and type and a member function template of the same name, which could be used to generate a specialization of the same type, can both be declared in a class. When both exist, a use of that name and type refers to the non-template member unless an explicit template argument list is supplied." With regards, Michael Kochetkov. "Stephan Keil" wrote in message news:39099e33$0$22977@businessnews.de.uu.net... > Hi, > > consider the following example: > > template > struct Blah > { > Blah(){} > > template > Blah(const Blah&) > { > cout << "Blah" << endl; > } > }; > > Blah bd(Blah()); > Blah bi(Blah()); > > With VC++ 6.0 the construction of 'bd' invokes the templated > constructor where as the construction of 'bi' does not > (i.e. apparently the compiler generated copy constructor > is used instead). Is this correct behaviour according to > the standard? > > thanks for comments, > > Stephan > > > > --- > [ 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://reality.sgi.com/austern_mti/std-c++/faq.html ] > --- [ 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://reality.sgi.com/austern_mti/std-c++/faq.html ]