Detecting reuslt_of support - Error with VC 9

I've developepd this code snippet to detect if a type has the proper inner types for supporting result_of protocol : http://codepad.org/mcY4K7Sf It works fine under gcc and icc but fail under VC 9 with the following error : error C2903: 'result' : symbol is neither a class template nor a function template error C3202: 'result' : invalid default argument for template parameter '<Unknown>', expected a class template error C2976: 'has_result_impl' : too few template arguments seems I can't make VC to accept an unspecified template type as a template template parameter. Is there any known workaround for this situation I can implement to make this traits works in VC 9 ?

Joel Falcou wrote:
I've developepd this code snippet to detect if a type has the proper inner types for supporting result_of protocol :
Isn't that, rather, to detect if the type support the result protocol, as used in Boost Phoenix?

Joel Falcou wrote:
I've developepd this code snippet to detect if a type has the proper inner types for supporting result_of protocol :
http://codepad.org/mcY4K7Sf Isn't that, rather, to detect if the type support the result protocol, as used in Boost Phoenix? Well, I assume Phoenix use the *same* result_of protocol than boost
Mathias Gaunard a écrit : provide in boost/utility/result_of.hpp ? If yes, that's what I'm tryign to detect. -- ___________________________________________ Joel Falcou - Assistant Professor PARALL Team - LRI - Universite Paris Sud XI Tel : (+33)1 69 15 66 35

On Mon, Feb 9, 2009 at 5:43 AM, Joel Falcou <joel.falcou@u-psud.fr> wrote:
I've developepd this code snippet to detect if a type has the proper inner types for supporting result_of protocol :
It works fine under gcc and icc but fail under VC 9 with the following error :
I have something that has a similar goal, but it requires you to specify the function signature: http://tinyurl.com/bvbaba I'm not sure whether that strategy would work for you. Stjepan

AMDG Stjepan Rajko wrote:
On Mon, Feb 9, 2009 at 5:43 AM, Joel Falcou <joel.falcou@u-psud.fr> wrote:
I've developepd this code snippet to detect if a type has the proper inner types for supporting result_of protocol :
It works fine under gcc and icc but fail under VC 9 with the following error :
I have something that has a similar goal, but it requires you to specify the function signature: http://tinyurl.com/bvbaba
This test using the old phoenix result protocol failsl on vc9. #include <boost/dataflow/signals/connection/detail/result_of_defined.hpp> #include <boost/mpl/assert.hpp> class test { template<class T1, class T2> struct result { typedef int type; }; }; int main() { BOOST_MPL_ASSERT_NOT((boost::signals::detail::result_of_defined<test()>)); } In Christ, Steven Watanabe
participants (4)
-
Joel Falcou
-
Mathias Gaunard
-
Steven Watanabe
-
Stjepan Rajko