Boost logo

Boost :

Subject: Re: [boost] [contract] Without the macros
From: Lorenzo Caminiti (lorcaminiti_at_[hidden])
Date: 2016-06-15 17:26:11


On Wed, Jun 15, 2016 at 9:03 AM, Edward Diener <eldiener_at_[hidden]> wrote:
> On 6/15/2016 11:30 AM, Lorenzo Caminiti wrote:
>>
>> P.S. The library can also be used without C++11 lambda functions (or
>> any C++11 specific feature) but programmers have to write a fare
>> amount of extra code to program the precondition and postcondition
>> functors (using non-local functions, Boost.LocalFunction,
>> Boost.Funsion, Boost.Lambda, or some other approach) so that might not
>> useful in practice.
>
> You are certainly allowed to have your library require C++11. Since your
> library has already been accepted into Boost why not add it officially to
> Boost as a C++11 on up library ?

True, but the library compiles on C++03 as well. There are explicit
comments in the docs that indicate the library is most useful when
C++11 lambda functions are available (plus essentially all examples in
the docs use lambdas):

``It is possible to use this library without C++11 lambda functions
but a large amount of boiler-plate code is required to manually
program separate functions to specify preconditions and postconditions
(so using this library without C++11 lambda functions is not
recommended, see No Lambda Functions).''

https://lcaminiti.github.io/boost-contract/doc/html/boost_contract/getting_started.html#boost_contract.getting_started.compilers_and_platforms

So, if I'll push the library in Boost, I'd probably push it as a
non-C++11 specific library that is however most useful on compiler
that support C++11 lambdas.

Thanks,
--Lorenzo


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