Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2004-11-30 10:34:52


Joaquín Mª López Muñoz wrote:
>
> David Abrahams ha escrito:
>
>> It seems to me that true is the appropriate safe default for
>> is_abstract. Am I missing something?
>>
>
>
> So that generic code won't try to instantiate an abstract type? Is
> this your rationale?

Yes.

> Well, maybe. In the case of Boost.Serialization, however, I think
> that the appropriate default is false, since serializating (types
> derived from) an abstract type is more difficult than the
> non-abstract case.

But serialization can always check the macro. The standard practice for
type traits that need some compiler support is to degrade gracefully
(code still compiles) and safely (only the most conservative assumptions
are made). Why shouldn't we do that in this case?

> Either way, if we have a BOOST_NO_IS_ABSTRACT (for instance) macro,
> the programmer can choose whether to rely on is_abstract's default of
> not.

Yes, but that's a different issue.

-- 
Dave Abrahams
Boost Consulting
http://www.boost-consulting.com

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk