|
Boost : |
From: Joel de Guzman (joel_at_[hidden])
Date: 2006-09-21 10:25:55
David Abrahams wrote:
> The extension docs show:
>
> template <typename Iterator>
> typename result_of::deref<Iterator>::type
> deref(Iterator const& i)
> {
> typename result_of::deref<Iterator>::type result =
> extension::deref_impl<typename Iterator::ftag>::
> template apply<Iterator>::call(i);
> return result;
> }
>
> Isn't that more complicated than necessary and likely to inhibit RVO?
>
> What about simply:
>
> template <typename Iterator>
> typename result_of::deref<Iterator>::type
> deref(Iterator const& i)
> {
> return extension::deref_impl<typename Iterator::ftag>::
> template apply<Iterator>::call(i);
> }
>
> ??
Yep. I'll let Dan deal with this (extension stuff). Anyway, I also
noticed some non-RVO safe code in the library and fixed them.
Thanks!
Regards,
-- Joel de Guzman http://www.boost-consulting.com http://spirit.sf.net
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk