mirror of
https://github.com/cookiengineer/audacity
synced 2025-05-02 08:39:46 +02:00
Correct template parameters to std::iterator base of TrackIter...
... so that std::reverse_iterator<TrackIter<T>> works right, not making a subtle error of return of reference to a temporary in its operator * with some compilers.
This commit is contained in:
parent
50f2b0e860
commit
75918918c4
@ -818,7 +818,14 @@ template <
|
||||
typename TrackType // Track or a subclass, maybe const-qualified
|
||||
> class TrackIter
|
||||
: public std::iterator<
|
||||
std::bidirectional_iterator_tag, TrackType *const
|
||||
std::bidirectional_iterator_tag,
|
||||
TrackType *const,
|
||||
ptrdiff_t,
|
||||
// pointer is void to disable operator -> in the reverse_iterator...
|
||||
void,
|
||||
// ... because what operator * returns is really a value type,
|
||||
// so you can't take its address
|
||||
TrackType *const
|
||||
>
|
||||
{
|
||||
public:
|
||||
|
Loading…
x
Reference in New Issue
Block a user