Boost logo

Geometry :

Subject: [ggl] Headers order (was: problems with Boost Geometry Xcode compile?)
From: Bruno Lalande (bruno.lalande)
Date: 2010-03-12 06:16:59


Hi Mateusz,

> Aha! I see your point much better now. I agree that it is necessary or a
> good idea, sometimes. But, as probably everyone here has observed,
> experiences with variety of C/C++ implementations and build environments
> show that the judgement on what headers are troublesome and what are
> save is somewhat fragile.

Yep, good sense must be preferred to any strong rule anyway.

> Quick test with GCC shows that even if I really want to be C++ purist,
> I'm being offered with pile of unrelated garbage:
>
> #include <iostream>
> #ifdef _GNU_SOURCE
> #error _GNU_SOURCE
> #endif

Note that there's nothing wrong here, since leading underscores
followed by an uppercase letter are reserved to the implementation,
according to the standard. Quoted from the standard:

* Each name that contains a double underscore (_ _) or begins with an
underscore followed by an uppercase letter (2.11) is reserved to the
implementation for any use.
* Each name that begins with an underscore is reserved to the
implementation for use as a name in the global namespace.165

Which explains why the STL is so full of horrible and unreadable
variable names :-)

Regards
Bruno


Geometry list run by mateusz at loskot.net