Hacker News new | past | comments | ask | show | jobs | submit | BudVVeezer's comments login

The title is incorrect, it's WG23, not WG32.


The ID number is sort of noise in the title anyhow so we'll just take it out.


Is there an explanation for why that happens to even non-dyslexics?


There are tons of explanations. If you want a fancy one: depending on whether you type 23 on the numeric row with your left hand or on the numeric keypad with your right hand, the finger order is reversed.


Exactly. This happens to me frequently.


> __they don't want these things next to where they live__.

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


yeah, and good luck convincing anyone, anywhere that building a methadone clinic in their back yard is a good idea.

here's another turn of phrase you might find handy: choose your battles.


why should it be a problem? in the UK, methadone is normally dispensed from a regular pharmacy, just like any other prescription you might get from your doctor. I wonder if what you are seeing is that the clinic has been placed in a neighbourhood that already had high crime/homelessness/etc. since that is where the addicts who need its services are? it just seems odd that a clinic would be placed in an affluent area, where property costs are probably high, and the service users have to travel to get there, but maybe it's an american thing?


I know some people complaining about the noise from child care in their neighborhood.


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.


I agree that it's consistent, I find it easier to read when the branching condition is front and center. In 99% of cases I've encountered, the scope of the branching condition variable doesn't matter. When it does, an extra set of {} defines a scope clearly.


An extra set of {} seems to be clutter to me.


That plus extra indentation. It also obscures the intent since it's not necessarily unambiguous why those braces are there? Is it just to group logically related code (without putting it in a separate method/function) or is it because you're relying on RAII -- it's only possible to tell by searching for destructors on all the classes you're instantiating.


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.


The clang-tidy tool has some C++ Core Guideline checks under the cppcoreguidelines module.


Some of these rules are currently in clang-tidy, but the coverage is by no means comprehensive. Patches always welcome. :-)


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...


> 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

If memory safety is actually important to you, there's now an actual practical solution: SaferCPlusPlus[1].

A tool to automatically retrofit memory safety to existing C/C++ code is in early development (but resources are limited so it might be a while).

[1] shameless plug: https://github.com/duneroadrunner/SaferCPlusPlus


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.


Cool, thanks for the clarification!


Is it the /d1reportSingleClassLayoutXXX flag, described here?

https://blogs.msdn.microsoft.com/vcblog/2007/05/17/diagnosin...


This detects differing structure layouts between compilation units which is simple to do given some metadata in the object files. On the other hand it also shows why detecting ODR violations for executable code is non-trivial, because same source code compiled with different compiler flags can lead to different output that might or might not be compatible (enforcing same compiler configuration for all compilation units is certainly non-starter, think JS runtime vs. FFmpeg, 3D renderer vs. physics simulation...).


You are forgetting attributes, which can be empty and are grammatical sequences (so you can add them infinitely).

[[]][[]][]()[[]][[]]{}();


Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: