Boost logo

Boost :

Subject: Re: [boost] [contract] concepts: pseudo-signatures vs. usage patterns
From: Dave Abrahams (dave_at_[hidden])
Date: 2012-10-13 21:06:43


on Sat Oct 13 2012, Lorenzo Caminiti <lorcaminiti-AT-gmail.com> wrote:

> On Sat, Oct 13, 2012 at 2:40 PM, Andrzej Krzemienski <akrzemi1_at_[hidden]> wrote:
>>> > Of course this is achievable only in concepts as language feature. Any
>>> > use-pattern-based concept library will not be able to implement this
>>> > behavior, as far as I am aware.
>>>
>>> On the other hand, a pseudo-signature-based library conceivably could.
>>>
>>
>> And since this discussion started because Lorenzo wonders which of the two
>> approaches to take for his library, perhaps this limitation gives us the
>> answer.
>
> ... which is sounding more and more like Lorenzo should leave N3351
> alone, help Matt at least implementing a front-end macros like the
> ones below (s/CONTRACT_CONCEPT/BOOST_GENERIC_CONCEPT or similar), and
> use concepts defined using Boost.Generic in Boost.Contract requires
> clause.
>
> http://contractpp.svn.sourceforge.net/viewvc/contractpp/trunk/doc/html/contract__/concepts.html#contract__.concepts.concept_definitions__not_implemented_

Caveat: I do doubt that you can do the forced conversions in a library
without loss of efficiency, but it's worth a try anyhow.

-- 
Dave Abrahams
BoostPro Computing                  Software Development        Training
http://www.boostpro.com             Clang/LLVM/EDG Compilers  C++  Boost

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