1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-08-08 08:01:19 +02:00

Correct transform_iterator ?

This commit is contained in:
Paul Licameli 2018-09-06 20:04:38 -04:00
parent 7ab97c969c
commit d6dea3d224

View File

@ -647,7 +647,7 @@ public:
transform_iterator operator -- (int)
{ auto copy{*this}; --this->mIterator; return copy; }
typename transform_iterator::reference operator * ()
Result operator * ()
{ return this->mFunction(this->mIterator); }
friend inline bool operator == (
@ -676,8 +676,8 @@ template < typename Function, typename Iterator > struct value_transformer
// Adapts a function on values to a function on iterators.
Function function;
auto operator () (const Iterator &iterator)
-> decltype( function( *iterator ) ) const
auto operator () (const Iterator &iterator) const
-> decltype( function( *iterator ) )
{ return this->function( *iterator ); }
};