Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2006-09-19 12:34:38


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

??

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