Skip to content

Comment on Ask HN: How to refresh on modern features of C++?parent

Comments

For Google open source projects, all C++11 features are approved except the following ones[0]:

    Functions (other than lambda functions) with trailing return types, e.g. writing auto foo() -> int; instead of int foo();, because of a desire to preserve stylistic consistency with the many existing function declarations.

    Compile-time rational numbers (<ratio>), because of concerns that it's tied to a more template-heavy interface style.

    The <cfenv> and <fenv.h> headers, because many compilers do not support those features reliably.

    Default lambda captures.
For Chromium, it's a completely different set of rules[1].

[0] http://google-styleguide.googlecode.com/svn/trunk/cppguide.h...

[1] https://chromium-cpp.appspot.com/

OSS projects would, presumably, have far fewer restrictions than internal revenue-bearing production use?

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.