Article View: comp.std.c++
Article #3530Re: Q: default constructor for fundamental types?
From: Jamshid Afshar
Date: Wed, 28 Feb 1996 01:14
Date: Wed, 28 Feb 1996 01:14
29 lines
1565 bytes
1565 bytes
In article <9602271131.AA18225@lts.sel.alcatel.de>,
James Kanze US/ESC 60/3/141 #40763 <kanze@lts.sel.alcatel.de> wrote:
>Expressions of the form `int()' have always been allowed. A (fairly)
>recent change to the draft standard states that they have the same
>value as default static initialization (in this case, 0). The earlier
>rules had the initailization undefined.
Is the following legal?
class Foo {
int x;
public:
Foo()
: x() // legal?
{}
};
and if so is it different than just:
Foo::Foo() {}
--Jam
---
[ To submit articles: try just posting with your news-reader.
If that fails, use mailto:std-c++@ncar.ucar.edu
FAQ: http://reality.sgi.com/employees/austern_mti/std-c++/faq.html
Policy: http://reality.sgi.com/employees/austern_mti/std-c++/policy.html
Comments? mailto:std-c++-request@ncar.ucar.edu.
]
Technical Details
Message-ID:
<4gvte1$qvd@xanadu.io.com>Path:
arc1-ca.pugleaf.net!in2.uu.net!bounce-backReferences:
<4glrdc$dqo@ra.ibr.cs.tu-bs.de> <4gsvhn$csi@clarknet.clark.net> <9602271131.AA18225@lts.sel.alcatel.de>Show Full Headers
Complete Article Headers
From: jamshid@io.com (Jamshid Afshar) Message-ID: <4gvte1$qvd@xanadu.io.com> X-Original-Date: 27 Feb 1996 15:34:57 -0600 Path: arc1-ca.pugleaf.net!in2.uu.net!bounce-back Date: 28 Feb 96 01:14:21 GMT Approved: fjh@cs.mu.oz.au Return-Path: <daemon@meeker.UCAR.EDU> Newsgroups: comp.std.c++ Subject: Re: Q: default constructor for fundamental types? Organization: Illuminati Online, Austin, Texas, USA References: <4glrdc$dqo@ra.ibr.cs.tu-bs.de> <4gsvhn$csi@clarknet.clark.net> <9602271131.AA18225@lts.sel.alcatel.de> X-Auth: PGPMoose V1.1 PGP comp.std.c++ iQBFAgUBMTOsfeEDnX0m9pzZAQEKWgGAi6o1Q50PLxRQRlQCmhNnd8qXX4rS6fZx B3u9mxkToNL9cwOYuVLOfUJjuxMwhmAF =deNt