1 2 3 4 5 6 7 8 9 10 11 12
namespace shark { template<class Closure> struct indexed_iterator { typedef typename boost::mpl::if_< boost::is_const< Closure >, typename Closure::const_reference, typename Closure::reference >::type reference; }; }