Example #1
0
 expected( value_type const & rhs )
 : has_value( true )
 {
     contained.construct_value( rhs );
 }
Example #2
0
 expected( expected const & rhs )
 : has_value( rhs.has_value )
 {
     if ( has_value ) contained.construct_value( rhs.contained.value() );
     else             contained.construct_error( rhs.contained.error() );
 }
Example #3
0
 void initialize_value( V const & v )
 {
     assert( ! has_value );
     contained.construct_value( v );
     has_value = true;
 }