I didn't know that g++ would complain about it. I'll fix the examples, thanks.
It won't without the proper flags. But I always compile in the highest level possible, that's why those came up.
Thanks for fixing.
Edit:Another question: Is it possible to somehow get rid of the initialization (binding) functions? I'm currently playing around with it in SFGUI and I don't like the fact very much that there has to be a function "InitCAMPWrappers()" or similar to initialize all the bindings.
That alone wouldn't be a problem, but when users are extending the GUI with own widgets and distribute them, then developers who use them have to take care of calling the foreign initialization functions.
I'm already thinking about code to automatically accomplish this, but couldn't get to a solution yet (one was to provide a Widget::InitImpl, that gets automatically called when an object of a widget type is constructed, but the time this is called could be much too late, for example when widgets are going to be deserialized).
Edit²:Wait.. Initialization doesn't really take place in a free function, right? I mean, you create an object of type camp::Class::declare<..>, right? That'd mean that this can take place directly in the widget's source file.
Edit³:Just tried that out. Since members are directly called, this can't be done in global scope.