From 629ea6a1f6832491080f81226d7bce50ab2a8584 Mon Sep 17 00:00:00 2001 From: Dennis Brentjes Date: Fri, 20 Jun 2014 13:13:20 +0200 Subject: Fixed some weird template specialisation issue on some compilers --- fusion_static_dispatch.hpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/fusion_static_dispatch.hpp b/fusion_static_dispatch.hpp index 5db3e16..5aba3df 100644 --- a/fusion_static_dispatch.hpp +++ b/fusion_static_dispatch.hpp @@ -123,6 +123,9 @@ void set_nth(T& x, int index, boost::any const& value) apply_functor_to_member(index, x, value); } +template +std::string get_nth_name(int index); + template struct get_nth_name_functor { @@ -143,11 +146,11 @@ struct get_nth_name_functor> template static return_type call() { - constexpr size_t size_of_T = friendly_fusion::result_of::size::type::value; + constexpr int size_of_T = friendly_fusion::result_of::size::type::value; if(I < size_of_T){ - return apply_functor_to_member(I); + return get_nth_name(I); } else { - return apply_functor_to_member(I - size_of_T); + return get_nth_name(I - size_of_T); } } }; -- cgit v1.2.3-70-g09d2