Topic: Standards


Author: Darin Adler <darin@bentspoon.com>
Date: 2000/03/16
Raw View
In article <38CFC673.23B3C2C@students.fct.unl.pt>, Joao Graca da
Nobrega <jgn09360@students.si.fct.unl.pt> wrote:

> Is this kind of declaration Standard C++?
>
>     int *p = new int[10] (0);

No.

The wording in section 5.3.4/15 of the standard makes it clear that a
non-empty new-initializer is only allowed if the type is a class,
arithmetic, enumeration, pointer, or pointer-to-member type. An array
type is not any of these.

On the other hand, the standard seems to say that this is allowed:

   int *p = new int[10] ();

In this case it should cause all the integers to be initialized to zero.
However, the compiler I use most often, CodeWarrior Pro 5.3, rejects
this syntax. I think it's a bug in my compiler.

    -- Darin

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






Author: Joao Graca da Nobrega <jgn09360@students.si.fct.unl.pt>
Date: 2000/03/16
Raw View
Is this kind of declaration Standard C++?

int *p = new int[10] (0);

I had this line of code working with a version of g++, but it didn't
work when I start using to a new version.

J.

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






Author: "Tom Linehan" <tjlinehan@worldnet.att.net>
Date: 1997/03/30
Raw View
I am new at this.  There is a website in which the proposed C++ standards
are posted.  Please let me know.
--

Tom Linehan
tjlinehan@worldnet.att.com
---
[ comp.std.c++ is moderated.  To submit articles: Try just posting with your
                newsreader.  If that fails, use mailto:std-c++@ncar.ucar.edu
  comp.std.c++ FAQ: http://reality.sgi.com/austern/std-c++/faq.html
  Moderation policy: http://reality.sgi.com/austern/std-c++/policy.html
  Comments? mailto:std-c++-request@ncar.ucar.edu
]





Author: dstipe@server2.iac.honeywell.com (Dale Stipe)
Date: 23 Aug 1994 21:10:17 GMT
Raw View
Anyone know the standards group; ISO, ANSI, etc. that is currently working on
standardizing C++.  Sorry if this is in an FAQ but I need an answer ASAP.

Thanks in advance
dale