Boost logo

Boost :

Subject: Re: [boost] Interest in an 'either' library?
From: Mathias Gaunard (mathias.gaunard_at_[hidden])
Date: 2013-06-21 18:42:04


On 21/06/13 18:35, David Sankel wrote:
> **semantics**:
>
> template< typename left_type, typename right_type>
> struct either
> {
> // postcondition, is_left()
> either( left_type );
>
> // postcondition, is_right()
> either( right_type );
>
> bool is_left() const;
> bool is_right() const;
>
> // postcondition, is_left()
> either & operator=( left_type );

What happens if the 'either' originally contained a right_type and that
the copy/move constructor of left_type throws?


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