First, I hope I have found the new home for GTKMM discussion.
I have discovered that if I create a class called “pipe,” somewhere in gtkmm.h this is already declared, and my program can’t compile:
#include <gtkmm.h>
class pipe
{
public:
pipe() : interactionState(true) { };
protected:
bool interactionState;
};
int main()
{
pipe foo;
return 0;
}
48> g++ `pkg-config --cflags gtkmm-3.0` -o pipe pipe.cpp
pipe.cpp: In function 'int main()'
pipe.cpp:13:9: error: expected ';' before 'foo'
13 | pipe foo;
| ^~~~
| ;
I either have to remove the include to gtkmm.h, or in main declare foo with “class pipe foo.”
I was not expecting that GTKMM adds anything to the global namespace, and that everything is declared in one of the GTKMM specific namespaces. Here are my questions:
Is this expected, or does this seem to be a mistake, something that slipped through but which ought to be found under Gtk::pipe, for example? Please note that I am using GTKMM 3.24.7.
If this is expected or not intended to be fixed, is there a way that I can encapsulate this and any other leaked names back into Gtk or some other namespace?
Thanks for your time.