
1 Aug
2011
1 Aug
'11
4:47 a.m.
Den 30-07-2011 01:13, Nathan Ridge skrev:
But now range_iterator gives an error as indicated above, so we have to do something awkward and verbose like this:
template<typename Range>
typename range_iterator<typename remove_reference<Range>::type>::type some_function(Range&& r) { ... }
Could the range metafunctions be modified to accept range reference parameters and remove the reference themselves?
This is indeed annoying. I guess we could do the following for all meta-functions: template< class T > struct meta<T&> : meta<T> {} -Thorsten