Get the latest tech news

map::operator[] should be nodiscard


Lately libc++ has been adding the C++17 [[nodiscard]] attribute aggressively to every header. (I’m not sure why this month, but my guess is that libc++ just dropped support for some old compiler such that all their supported compilers now permit the attribute even in C++11 mode.) libc++ is following the trail that Microsoft STL has blazed since VS 15.6 in late 2017.

None

Get the Android app

Or read this on Hacker News

Read more on:

Photo of map

map

Photo of Operator

Operator

Photo of Nodiscard

Nodiscard

Related news:

News photo

Map of all the buildings in the world

News photo

Kapow! Episodic gaming really is back on the map - the Dispatch success story continues

News photo

Is episodic gaming back on the map? Ex-Wolf Among Us devs' superhero workplace comedy Dispatch sells big to become a well-deserved smash