j
k
j a
j l
Bruno MartÃnez Aguerre wrote:
Why not: optional& operator=(optional rhs) { optional_swap(*this, rhs); return *this; } ?
Why not:
optional& operator=(optional rhs) { optional_swap(*this, rhs); return *this; } ?
Because this encodes an implementation detail (that copy+swap is being used) in the signature of operator=.
Back to the thread
Back to the list