diff options
| author | Dennis Brentjes <d.brentjes@gmail.com> | 2014-06-20 13:13:20 +0200 |
|---|---|---|
| committer | Dennis Brentjes <d.brentjes@gmail.com> | 2014-06-20 13:13:20 +0200 |
| commit | 629ea6a1f6832491080f81226d7bce50ab2a8584 (patch) | |
| tree | edd3aabbc225c32200ede0ee84b05d0c5ed1b945 | |
| parent | a1737ecbd0aaea0aa8ce34557663cf0b4cdb8910 (diff) | |
| download | generic-gui-629ea6a1f6832491080f81226d7bce50ab2a8584.tar.gz generic-gui-629ea6a1f6832491080f81226d7bce50ab2a8584.tar.bz2 generic-gui-629ea6a1f6832491080f81226d7bce50ab2a8584.zip | |
Fixed some weird template specialisation issue on some compilers
| -rw-r--r-- | fusion_static_dispatch.hpp | 9 |
1 files 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 @@ -124,6 +124,9 @@ void set_nth(T& x, int index, boost::any const& value) } template <typename T> +std::string get_nth_name(int index); + +template <typename T> struct get_nth_name_functor { typedef std::string return_type; @@ -143,11 +146,11 @@ struct get_nth_name_functor<boost::fusion::joint_view<T,U>> template <int I> static return_type call() { - constexpr size_t size_of_T = friendly_fusion::result_of::size<T>::type::value; + constexpr int size_of_T = friendly_fusion::result_of::size<T>::type::value; if(I < size_of_T){ - return apply_functor_to_member<T, get_nth_name_functor>(I); + return get_nth_name<T>(I); } else { - return apply_functor_to_member<U, get_nth_name_functor>(I - size_of_T); + return get_nth_name<U>(I - size_of_T); } } }; |
