Subject: Re: [boost] [concept_check] Some issues
From: Stewart, Robert (Robert.Stewart_at_[hidden])
Date: 2011-11-25 12:07:22
Robert Kawulak wrote:
> I've spotted some problems when playing with BCCL:
> - 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. Are archetypes are supposed to be composable? Even if so, not all combinations are possible.
> - copy_constructible_archetype defines public default
> constructor - again, am I overlooking something or it should
> not be there?
I wouldn't think so.
> - Function and predicate archetypes also seem to provide too
> wide interface (they are copy constructible and assignable).
Since you're asking, and I haven't checked to verify it, I presume that those operations are not part of the corresponding concepts. If so, then I agree they should not be available.
> Additionally, they don't allow for archetypes chaining since
> they lack the Base parameter (with the only exception of
> binary_predicate_archetype - why the inconsistency?)
Are they supposed to be generally chainable?
> - Apart from the provided function object concepts and
> archetypes it seems it would be useful to have a general
> Callable concept and the corresponding callable_archetype,
> parameterised with the types of arguments and return value.
> Wouldn't it be valuable to add them?
That seems plausible and useful.
Rob Stewart robert.stewart_at_[hidden]
Software Engineer using std::disclaimer;
Dev Tools & Components
Susquehanna International Group, LLP http://www.sig.com
IMPORTANT: The information contained in this email and/or its attachments is confidential. If you are not the intended recipient, please notify the sender immediately by reply and immediately delete this message and all its attachments. Any review, use, reproduction, disclosure or dissemination of this message or any attachment by an unintended recipient is strictly prohibited. Neither this message nor any attachment is intended as or should be construed as an offer, solicitation or recommendation to buy or sell any security or other financial instrument. Neither the sender, his or her employer nor any of their respective affiliates makes any warranties as to the completeness or accuracy of any of the information contained herein or that this message or any of its attachments is free of viruses.