
1 Aug
2011
1 Aug
'11
8:29 p.m.
template<typename Range>
typename range_iterator
::type some_function(Range&& r) { ... } Could the range metafunctions be modified to accept range reference parameters and remove the reference themselves?
allthough we should probably be careful here; maybe its better just to say
template< class R > auto some_fun( R&& r ) -> decltype(boost::begin(r));
What do we need to be careful about? IMO this is a case where writing out the return type (range_iterator<R>::type) is more readable than using decltype. Regards, Nate