|
Boost : |
Subject: Re: [boost] Is there BOOST_ENABLE_IF macro now?
From: Mathias Gaunard (mathias.gaunard_at_[hidden])
Date: 2013-08-20 14:03:01
On 20/08/13 19:27, Matt Calabrese wrote:
> On Tue, Aug 20, 2013 at 6:11 AM, Mathias Gaunard <
> mathias.gaunard_at_[hidden]> wrote:
>
>>
>>> His argument is that the definition of concepts and their association
>> with types is not rigid and formal anymore. It's just any constant boolean
>> expression.
>> It's not a bug, it's a feature.
>
>
> It's not a "bug" or "feature," it's a design choice that makes it difficult
> or impossible to add proper template definition checking in the future and
> it also makes writing template definitions that use the concept more
> difficult than the 0x approach. In ConceptsLite, rather than dealing with a
> direct list of associated functions (including their parameter list and
> explicit return type) and associated types, you instead have to deduce
> everything from usage requirements if you are to actually check a template
> definition or write any code that slightly deviates from the precisely
> written usage specification. Programmers are used to writing functions
> where their parameter types correspond to a type specification and 0x
> concepts was extremely similar to that. You look at a concept definition
> much like you would a type definition, see its functions and types, and you
> are set.
All existing C++ concepts have requirements specified as a list of valid
expressions with the right properties, not with a class-like function list.
The new approach is more fitting to concepts as they've been used in C++.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk