#pragma once #include "friendly_fusion.hpp" #include "index_list.hpp" #include #include #include template struct ToQvariantFunctor { typedef QVariant return_type; template static return_type call(boost::any const& any) { typedef typename friendly_fusion::utils::DecayedTypeOfAtIndex::type value_type; return QVariant::fromValue(boost::any_cast(any)); } }; template QVariant to_qvariant(boost::any const& x, int index) { return apply_functor_to_member(index, x); } template struct ToBoostAnyFunctor { typedef boost::any return_type; template static return_type call(QVariant const& variant) { typedef typename friendly_fusion::utils::DecayedTypeOfAtIndex::type value_type; return boost::any(variant.value()); } }; template boost::any to_boost_any(QVariant const& x, int index) { return apply_functor_to_member(index, x); }