diff --git a/include/fc/api.hpp b/include/fc/api.hpp index 5ef581b..cf42287 100644 --- a/include/fc/api.hpp +++ b/include/fc/api.hpp @@ -4,6 +4,14 @@ #include #include +// ms visual c++ (as of 2013) doesn't accept the standard syntax for calling a +// templated member function (foo->template bar();) +#ifdef _MSC_VER +# define FC_CALL_MEMBER_TEMPLATE_KEYWORD +#else +# define FC_CALL_MEMBER_TEMPLATE_KEYWORD template +#endif + namespace fc { struct identity_member { template @@ -46,7 +54,7 @@ namespace fc { T& ptr = boost::any_cast(*_data); auto& pointed_at = *ptr; typedef typename std::remove_reference::type source_vtable_type; - _vtable->template visit_other( vtable_copy_visitor(pointed_at) ); + _vtable->FC_CALL_MEMBER_TEMPLATE_KEYWORD visit_other( vtable_copy_visitor(pointed_at) ); } api( const api& cpy ):_vtable(cpy._vtable),_data(cpy._data) {}