Boost logo

Boost :

Subject: Re: [boost] N2346 - Defaulted and Deleted Functions emulation
From: David Abrahams (dave_at_[hidden])
Date: 2009-03-02 09:18:06

on Sun Mar 01 2009, "vicente.botet" <> wrote:

> My concern is that:
> emulates the syntax but not the semantics of
> The point of using the C++0x T()=default syntax is probably to ensure
> that the class is a POD.
> In C++03, the class designer has to make a design tradeoff. If
> providing a default constructor is more important than making the
> class a POD, then your emulation is OK. But if the priorities are the
> other way around, then the macro should just eliminate the default
> constructor.

Really the only likely use is to ensure POD-ness, because after all "{}"
is a lot easier to type and read than "=default;"

One thing we could do in the macro is to


Of course, if you know enough about your implementation you can
specialize boost::is_pod<YourType> (with the usual caveats if you get it

I'm not sure it'd be worth it though.

Dave Abrahams
BoostPro Computing

Boost list run by bdawes at, gregod at, cpdaniel at, john at