On Fri, 7 Dec 2007 09:50:57 -0800 "Jon A. Cruz" <jon@...18...> wrote:
On OS X using gcc 4.0.1 the latest SVN breaks with template issues
./ui/dialog/panel-dialog.h:124: error: template-id 'create<>' for 'Inkscape::UI::Dialog::PanelDialog<Inkscape::UI::Dialog::Behavior::Float ingBehavior>* Inkscape::UI::Dialog::PanelDialog<Inkscape::UI::Dialog::Behavior::Floati ngBehavior>::create()' does not match any template declaration
Auch... sorry for that, I use 4.1.3 and for me it compiles fine. I'm pretty sure it's valid C++ -- here's a minimal test case on what I think it chokes on (tried with success in gcc 4.1 and Comeau):
-------------------------------------------------
#include <iostream>
template<class T> class X { public: template <typename T2> static void f(); };
template <typename T> template <typename T2> void X<T>::f() { std::cerr << "T" << std::endl; }
template <> template <typename T2> void X<float>::f() { std::cerr << "float" << std::endl; }
int main() { X<char *> a; X<float> b; a.f<void>(); b.f<void>(); }
-------------------------------------------------
Does that compile for you using your gcc 4.0.1?
Here's a quick and dirty attempt of rewriting the classes to avoid this type of specialization, could you please see if it compiles with it?
http://www.csc.kth.se/~broberg/inkscape_compile_problems_2007-12-08.patch
Thanks, and sorry...
-- Gustav