Subject: Re: [boost] [concept_check] Some issues
From: Dave Abrahams (dave_at_[hidden])
Date: 2011-12-15 06:53:55
on Fri Nov 25 2011, Robert Kawulak <robert.kawulak-AT-gmail.com> wrote:
>> From: Stewart, Robert
>> > - The implementation of assignable_archetype defines private
>> > default and copy constructors, so for example
>> > assignable_archetype<copy_constructible_archetype<>> will not
>> > actually be copy constructible. The same for
>> > convertible_to_archetype and convertible_from_archetype, but
>> > additionally with copy assignment. Is this by purpose?
>> I should think that's by design. The archetypes are to validate a
>> particular concept checking class, so a copyable or default
>> constructible archetype for Assignable would be wrong.
> I wouldn't say it's wrong. If you can combine several concepts, you should
> be able to combine the corresponding archetypes too. If your template
> requires more than one concept (e.g., a type that is BOTH copyable AND
> assignable), then without the ability of chaining you would have to write
> your own archetypes in all but the most trivial cases.
I think the problem is that C++03 doesn't let you define copyability and
assignability "additively," and offers no way to detect those
capabilities so we can decide not to subtract them.
-- Dave Abrahams BoostPro Computing http://www.boostpro.com
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk