Hlavní navigace

Názor ke zprávičce C++20 v GCC 10 bude mít operátor vesmírné lodi <=> od Ondřej Novák - Ten operátor by měl mít význam hlavně při...

  • Aktualita je stará, nové názory již nelze přidávat.
  • 6. 12. 2019 17:23

    Ondřej Novák

    Ten operátor by měl mít význam hlavně při jeho přetěžování. Psát blok všech variant je na pikaču


    bool operator>(const T &other) const;
    bool operator<(const T &other) const;
    bool operator=>(const T &other) const;
    bool operator=<(const T &other) const;
    bool operator!=(const T &other) const;
    bool operator==(const T &other) const;

    vs


    int operator<=>(const T &other) const;