On 05/28/2012 09:26 PM, Steven M. Schweda wrote:
> any environment-specific code really needs to be tested in
> the specific environment

Sure, that's important, but it's also important
to minimize the number of problems that can slip
through and be caught only by testing.  Our tests
are not exhaustive, and can't be expected to be.
For properties where portable compile-time checks
are easy to do (as they are here), there's a good
argument for doing them.

> And it's impossible/impractical to arrange this
> commonality using #define (et al.)?

I'm sure one can do it with #if and #define as well,
but the result won't be appreciably simpler than the
"if (...)" version.  And why bother?  The "if (...)"
version has the advantage of more-portable
compile-time checking.

Reply via email to