SeadexGmbH/yasmine

State machine inside template class fails compilation on GCC/Ubuntu

Closed this issue · 5 comments

Hello! First of all, thank you for such a great library :)

Y_BEHAVIOR_FUNCTION2 and Y_GUARD_METHOD2 fails to compile when passing template class member function to them only on GCC/Ubuntu. MSVC/Windows works fine. The fix is to use "typename std::remove_pointer" instead of "std::remove_pointer" inside assemblies.hpp.

Hi sedapsfognik,

we're glad that you like our library and thanks for your feedback about this bug!
We'll check it out and fix it. Thanks as well for providing a solution right away!
Can you please tell us which version of gcc you are using? We're currently fixing some minor stuff that bothers gcc 4.8.4, so it'd be interesting to know which version of gcc doesn't like the missing typename.

For clarification:
Did you mean Y_BEHAVIOR_METHOD2 or Y_BEHAVIOR_FUNCTION2 (as you wrote above)?
Thanks for your help.

Hello, yes, I made a typo. It is Y_BEHAVIORAL_METHOD2. I'll answer later on GCC version.

I have GCC 5.0.4.

Fixed with version 1.3.3