Re: [AD] namespace collision |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
George Foot wrote:
> I can't think of any lasting problems now except for:
[a-c snipped]
d) A user program defines its own structures, e.g.:
struct {
int clear;
int exists;
} foo;
or
enum {
circle, ellipse, line, triangle, rect, polygon, arc, spline
} object_shape;
> Overall I don't think these are serious at all
I'm not sure if d) is serious or not. If it only appears in user
programs, then it is only a problem if such a structure is used in one
file which #includes allegro.h and also in another which does not, or if
`#include <allegro.h>' appears below `#include
<the_file_in_which_struct_foo_is_defined.h>' in a source file, and in
both cases it is trivial to fix (by inserting
`#include <allegro.h>' at the top of each file).
On the other hand, I think it would be a problem if some commonly used
library, e.g. some system's header, has a struct or class with members
called e.g. `clear' or `exists'. I don't know if this happens though.
Sven