Recent submissions

Comment · 9 years ago
The title is incorrect, it's WG23, not WG32.
Comment · 9 years ago
> __they don't want these things next to where they live__.

Which is the precise definition of Not In My Back Yard...

Comment · 9 years ago
It's consistent with for (init; condition;) {} and solves a problem like:

if (std::vector<int> v = f(); !v.empty()) { // Use v }

without requiring an extra compound statement to limit the scope and lifetime of v.

Comment · 9 years ago
Not quite.

It was submitted for PDTS (proposed draft technical standard), which means it goes out for balloting to ISO national bodies. That balloting either succeeds (at which point you have a Techincal Specification) or it comes back to the committee with comments that the committee then has to respond to (and then another round of balloting happens). Once it's accepted as a Technical Specification, it's still not part of the C++ International Standard. That's a decision the committee comes to at their own pace, much like what happened at this meeting where the Concepts TS was accepted (as amended) into the IS.

Think of a TS somewhat like a beta. There's no assurance that the contents of the TS will go into the IS at all or in the exact form it was originally specified in, but that's certainly the hope when the TS is published.

Comment · 9 years ago
The clang-tidy tool has some C++ Core Guideline checks under the cppcoreguidelines module.
Comment · 9 years ago
Some of these rules are currently in clang-tidy, but the coverage is by no means comprehensive. Patches always welcome. :-)
Comment · 9 years ago
What's considered critical or difficult to discover is a bit subjective, but:

It's easy to forget that alignment is important on some architectures (other than for performance reasons), so be careful when using placement new: https://www.securecoding.cert.org/confluence/display/cpluspl...

This may seem obvious, but even the C++ committee got this one wrong when they created auto_ptr (which has since been removed from the standard): https://www.securecoding.cert.org/confluence/display/cpluspl...

This one is totally obvious but has a stunning number of ways you can fail to adhere to it, some of which look reasonable at first blush: https://www.securecoding.cert.org/confluence/display/cpluspl...

Comment · 9 years ago
Yes and no. Many compilers support #pragma once, but whether your build environment handles it is another matter. Having your headers on network drives, or having symlinks to your headers, etc can cause issues with #pragma once handling (depending on the implementation) that can often be hard to track down, especially if building with multiple compilers. Include header guards do not have these issues.
Comment · 9 years ago

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton