**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 );
// postcondition, is_right()
either & operator=( right_type );
// precondition, is_left()
left_type left();
// precondition, is_right()
right_type right();
private:
};
**uses**:
**Use 1**: Can be used as an alternative to exceptions or the (error
codes+set reference idiom):
either