From the information given it's impossible to say what error g++ 4.3
produces.
See the FAQ item titled "How do I post a question about code that
doesn't work correctly?", currently available at (among others) <url:
http://www.parashift.com/c++-faq/posting-code.html), in particular the
three first bullet points.
It's often a good idea to take a look at the FAQ.
- - -
That said, the code isn't quite valid standard C++:
* In standard C++ there is no `typeof`. It's a g++ language extension.
C++11 does have a similar `decltype`.
* A non-void function must not return by the execution passing out of
the end of the function body, this is Undefined Behavior. Probably,
judging from the code, the functions are meant to be used in compile
time TMP machinery, and then just be unimplemented. But still.
Also, Visual C++ 12.0 refuses to accept the
"typename=typeof(obj<T>().memfun()", but as I recall it has a bug in
this area so it doesn't indicate any other problem than portability:
better rewrite if you want this to compile also with Visual C++.
- - -
Btw., what was the problem?
Can you re-post, according to the FAQ guidelines?
Cheers & hth.,
- Alf