• flying_gel@lemmy.world
    link
    fedilink
    arrow-up
    0
    ·
    5 months ago

    I do appreciate how newer C++ standards have made these kinds of things a lot easier too.

    Define all comparison operators with just one one line using C++20

    auto operator<=>(const ClassName&) const = default;

    • xor@lemmy.blahaj.zone
      link
      fedilink
      English
      arrow-up
      1
      ·
      5 months ago

      It’s nice that this exists these days, but my god is it horrendously unreadable at a glance

      • Ephera@lemmy.ml
        link
        fedilink
        arrow-up
        1
        ·
        5 months ago

        It makes it look like they’re just adding random noise to avoid colliding with existing syntax. Maybe they can try a UUID next time…