22 Jun
2013
22 Jun
'13
1:11 p.m.
On Fri, Jun 21, 2013 at 4:42 PM, Mathias Gaunard < mathias.gaunard@ens-lyon.org> wrote:
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?
Good question. I think the tradeoffs that were made with Boost.Variant in that case would work just as well here. David Sankel