Subject: Re: [boost] markable -- informal review request
From: Klaim - JoÃ«l Lamotte (mjklaim_at_[hidden])
Date: 2016-09-20 05:12:12
On 16 September 2016 at 15:23, Andrzej Krzemienski <akrzemi1_at_[hidden]>
> Hi Everyone, I would like to ask your opinion, suggestions, and perhaps an
> informal review of the 'markable' library. An alternative to
> boost::optional when performance really matters. It is the second
> incarnation of the 'compact_optional' library that I have presented last
> The main differences from the previous version:
> * name change: it is called 'markable' so that it is not confused with
> 'optional'. It uses "mark values" and mark policies"
> * it has the ability to mark an empty state even for the types with strong
> invariants, by marking a bit pattern rather than any proper value of T (an
> idea by Matt Calabrese)
> An example use case:
> typedef markable<mark_int<int, -1>> opt_int;
> opt_int oi;
> opt_int o2 (2);
> assert (!oi.has_value());assert (o2.has_value());assert (o2.value() == 2);
> static_assert (sizeof(opt_int) == sizeof(int), "");
> The github repository: https://github.com/akrzemi1/markable
> And documentation therein:
> Any comments, suggestions or critique are most welcome.
I am interested in doing a quick review of this library, but I have first
to ask why "markable"?
I'm not sure I understand the intended meaning of this word in this context.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk