Re: how to avoid pulling in Win32 include "world" for mutex
* Daniel Kr?gler -> someone unidentified:
By the way, the pimpl idiom will have me doing a forward declaration
of CRITICAL_SECTION, but how? I don't know whether to declare it as:
I mean, what if I choose the former and windows chooses the latter or
This doesn't matter. From the point of the language both
are equivalent class-keys for non-union classes.
Actually it matters even less. :-)
The PIMPL idiom only requires a forward declaration of your own
implementation class, not of classes used in the implementation.
If consistency of using "struct" versus "class" is important with a
given compiler, then the solution is to just be consistent.
I think the someone unidentified (please include attributions with
quotes) was referring to an OS-provided class CRITICAL_SECTION, and in
that case the comment about having to forward-declare, was simply wrong.
By the way, it's a good idea to reserve all uppercase for macros, see
e.g. <url: http://www.research.att.com/~bs/bs_faq2.html#Hungarian>,
<url: http://www.research.att.com/~bs/bs_faq2.html#macro> and <url:
A: Because it messes up the order in which people normally read text.
Q: Why is it such a bad thing?
Q: What is the most annoying thing on usenet and in e-mail?
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]