• 0 Posts
  • 7 Comments
Joined 11 months ago
cake
Cake day: December 24th, 2023

help-circle






  • MadhuGururajan@programming.devtoC++@programming.devC++ Should Be C++
    ·
    edit-2
    11 months ago

    I am trying C++ for this year's advent of code. The most asinine thing i encountered is that the bracket operator on std::map writes 0 value if the key is not found. So your code doesn't compile if you declare a const map or a const map reference as a function parameter. Compiler fails with "discards const qualifier on argument".

    I mean, wtf?

    Edit: this is probably true for other STL containers