|
Boost : |
From: David Abrahams (dave_at_[hidden])
Date: 2003-10-23 09:15:38
"Thorsten Ottosen" <nesotto_at_[hidden]> writes:
> Take a look at this function:
>
> template<typename InputContainerT, typename SearchContainerT>
> iterator_range< typename string_algo::container_result_iterator<
> InputContainerT >::type >
> find_first(InputContainerT &, const SearchContainerT &);
>
> There is no overload for a constant first argument, so we can't use an
> rvalue as the first argument even though
> the algorithm does not mutate the argument.
>
> I would say we have to provide
>
> template<typename InputContainerT, typename SearchContainerT>
> iterator_range< typename string_algo::container_const_iterator<
> InputContainerT >::type >
> find_first(const InputContainerT &, const SearchContainerT &);
>
> too for all similar algorithms. I know this will break the implementation on
> compilers without ordering of function templates
Not in my experience. Are you sure?
-- Dave Abrahams Boost Consulting www.boost-consulting.com
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk