News for hackers. Stuff that matters.
Re:C++ 11 Auto: How to use and avoid abuse by dbyte on Sunday February 14, 2016 @03:56AM (#11097630)
auto with lambdas can be quite dangerous if you are adding different types inside their bodies. Type promotion rules should be well understood. During code reviews we spotted several overflow bugs when using ints because the dev were thinking auto as a sort of very powerful resource.

Explicit casting if often required to make sure subtle bugs won't show up in production.

Re:C++ 11 Auto: How to use and avoid abuse by cheez on Sunday February 14, 2016 @08:38AM (#11098215)
What do you mean about promotion rules with auto?
Re:C++ 11 Auto: How to use and avoid abuse by RotsiserMho on Sunday February 14, 2016 @10:12AM (#11098523)
Couldn't that have been found by turning on the signed-to-unsigned conversion warning?