Function operator=

Summary

#include <include/internal/catch_option.hpp>

(1) Option & operator=(Option const &_other)

(2) Option & operator=(T const &_value)

Function overload

Synopsis

#include <include/internal/catch_option.hpp>

Option & operator=(Option const &_other)

Description

No description yet.

Source

Lines 29-36 in include/internal/catch_option.hpp.

Option& operator= ( Option const& _other ) {
    if( &_other != this ) {
        reset();
        if( _other )
            nullableValue = new( storage ) T( *_other );
    }
    return *this;
}

Synopsis

#include <include/internal/catch_option.hpp>

Option & operator=(T const &_value)

Description

No description yet.

Source

Lines 37-41 in include/internal/catch_option.hpp.

Option& operator = ( T const& _value ) {
    reset();
    nullableValue = new( storage ) T( _value );
    return *this;
}





Add Discussion as Guest

Log in