On 11/04/2014 02:48 AM, Pekka Paalanen wrote:

I kind of wonder what including stdbool.h does to C++ sources using
compositor.h, but if that breaks, we'll hear about it.

Looks like there are attempts to make this work in gcc at least. The result is that the C++ bool, true, and false are used.

If I understand it right, doing "#include <stdbool.h>" in C++ will get /usr/include/c++/4.6/tr1/stdbool.h.

That file then includes /usr/include/c++/4.6/tr1/cstdbool

That file then includes /usr/lib/gcc/x86_64-linux-gnu/4.6/include/stdbool.h

That file (which would have worked if included directly instead of those C++ wrappers) then defines bool=bool, true=true, false=false, and _Bool=bool. I guess the reason it does this is so code that does "#ifdef bool" will work? I think that is overkill and it should have just done nothing.

Typically messy but functional.
_______________________________________________
wayland-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/wayland-devel

Reply via email to