• Kenton Varda's avatar
    Overload Maybe::operator=() to match all copy constructors. · ad9f2050
    Kenton Varda authored
    Previously we depended on the compiler to implicitly invoke the copy constructor followed by the assignment operator, but this can lead to the compiler making surprising decisions in some cases, such as deciding that the literal 0 is a better match for nullptr than for T. Overloading operator=() to match every copy constructor is the safe thing to do.
    ad9f2050
common.h 55 KB