Boost logo

Boost :

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
> year.
> 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:
> And documentation therein:
> Any comments, suggestions or critique are most welcome.
> Regards,
> &rzej;

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.

Joël Lamotte

Boost list run by bdawes at, gregod at, cpdaniel at, john at