Group: comp.lang.c++
From: Pete Becker
Date: Monday, April 07, 2008 3:22 PM
Subject: Re: replicating default constructor's "non-initializing state"

On 2008-04-07 15:19:10 -0400, "Victor Bazarov" said:

> Jason Doucette wrote:
>> Question:
>> Are there any compiler settings (even compiler specific ones; I am
>> using MSVC++) that state MY default constructor behaves exactly like
>> the regular default constructor?
>
> Not that I know of.

For the future, though, C++0x will let you do this:

struct S
{
S() = default;
S(int);
};

with the effect that the compiler will generate that default
constructor as if you hadn't declared the other one.

--
Pete
Roundhouse Consulting, Ltd. (www.versatilecoding.com) Author of "The
Standard C++ Library Extensions: a Tutorial and Reference
(www.petebecker.com/tr1book)

Safety Articles | Usenet Groups | Usenet News | Bluegrass