|
Boost : |
Subject: Re: [boost] [contract] toward N3351 concepts
From: Lorenzo Caminiti (lorcaminiti_at_[hidden])
Date: 2012-10-02 03:43:45
On Tue, Oct 2, 2012 at 12:35 AM, Sebastian Redl
<sebastian.redl_at_[hidden]> wrote:
> On 02.10.2012 09:26, Andrzej Krzemienski wrote:
>>>>
>>>> BTW, why do we declare concepts like:
>>>>
>>>> concept EqualityComparable< typename T > = ... // (1)
>>>>
>>>> Instead of:
>>>>
>>>> template< typename T >
>>>> concept EqualityComparable = ... // (2)
>>>>
> A concept isn't a template.
Of course.
> You don't instantiate a concept template to get
> specialized concepts.
However, syntactically you use it similarly to a template:
MyConcept<T1, T2, T3>
my_template<T1, T2, T3>
> There is just the concept, which has type parameters.
>
> This would be more obvious if we wrote it thus:
>
> concept <typename T> EqualityComparable = ... // (3)
Actually, this would make the most sense to me, why wouldn't we use
this syntax (3)?
Thanks,
--Lorenzo
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk