• 0 Posts
  • 379 Comments
Joined 2 years ago
cake
Cake day: June 26th, 2024

help-circle











  • Gladaed@feddit.orgtoProgrammer Humor@programming.dev•C++ superiority
    link
    fedilink
    English
    arrow-up
    15
    ·
    edit-2
    17 days ago

    Only one of those is a function, get it right. () Call functions <> Specialize Templates, can be used to do compile time calls to things that behave like functions. [] Accesses elements {} Calls constructors, aka functions that do the initial setup.

    Overloading these to do something else gets you in the naughty corner.

    Edit: the implementation of the {} fuckery is no great. Just save the sum instead of all numbers.