
on Sat Oct 13 2012, Lorenzo Caminiti <lorcaminiti-AT-gmail.com> wrote:
On Sat, Oct 13, 2012 at 2:40 PM, Andrzej Krzemienski <akrzemi1@gmail.com> 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/contr...
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