Subject: [boost] Interest in a "concepts lite" library?
From: Juan Pedro Bolivar Puente (raskolnikov_at_[hidden])
Date: 2016-04-20 04:48:37
With concepts lite not getting into C++17, the need for library-based
alternatives becomes more apparent. With this regard, the current
Boost.ConceptCheck library is outdated, as it emulates an too old
proposal for concepts, and it does not leverage more modern techniques
(e.g. expression sfinae).
Eric Niebler proposed in his Range-V3 library a technique to simulate
concept checking using C++11 . I myself implemented a variation of
such technique in the Atria library .
Atria's implementation differs in two ways with Range-V3 concepts:
- It is simpler, because it has no special support for refinements. A
concept refines another just by checking the refined concept in the
normal `requires` definition. The downside is that refinement
information can not be used for dispatch.
- It wants to be future-proof. Concepts defined with the
`ABL_CONCEPT_SPEC` macro can be automatically upgraded to a Concepts
Lite concept by redefining `ABL_CONCEPT` as `constexpr concept`.
There are few reasons though why Atria's implementation could not be
directly included in Boost. I would like to work on a more formal
proposal, but first I'd like to know if there is interest in it, and if
there are any obvious concerns or questionmarks.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk