Mail Archives: cygwin/1998/10/23/08:54:06
tjump AT cais DOT com (Theodore Jump) writes:
>
> With EGCS 1.1 on Cygwin B19.1/CoolView DLL g++ chokes on it.
>
> For reference, Microsoft Visual C++ 5 SP3 chokes also.
>
> Intel C++ 3.0 does *not*.
>
> I wonder what the 'spec' says, precisely, about this?
I thought it was a bug too, but I was mistaken.
Here's what Jason Merrill says quoting chapter and verse:
-- using template mhl.format --
Date: 22 Oct 1998 03:30:07 PDT
To: khan AT cygnus DOT com (Mumit Khan), egcs-bugs AT cygnus DOT com
From: Jason Merrill <jason AT cygnus DOT com>
Subject: Re: egcs-1.1: C++ aggregate initialization bug?
>>>>> Mumit Khan <khan AT xraylith DOT wisc DOT edu> writes:
> I believe that egcs is incorrect in trying to use a copy constructor in
> the aggregate initialization below. According to Dec'96 DWP Sec 12.6.2.2
> "Explicit Initialization", the initialization should only call test(int),
> and not nomplain about non-public copy constructor.
Nope.
8.5 - Initializers [dcl.init]
-12- The initialization that occurs in argument passing, function return,
throwing an exception (except.throw), handling an exception
(except.handle), and brace-enclosed initializer lists (dcl.init.aggr) is
called copy-initialization and is equivalent to the form
T x = a;
Jason
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".
- Raw text -