Boost logo

Boost Users :

Subject: Re: [Boost-users] [range] range metafunctions and reference types
From: Thorsten Ottosen (thorsten.ottosen_at_[hidden])
Date: 2011-08-01 16:23:15


> 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?

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));

-Thorsten


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net