This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFC] Interpretation of DR 198 resolution


Thanks Nathan for your feedback.

Unfortunately, I'm not sure to fully understand your explanation,
or, better, I'm not sure to understand why the resolution wants to
change "Effects:" from:

  Iterator tmp = current;
  return *--tmp;

to

  this->tmp = current;
  --this->tmp;
  return *this->tmp;

and, moreover, add:

[Note: This operation must use an auxiliary member variable, rather
than a temporary variable, to avoid returning a reference that persists
beyond the lifetime of its associated iterator.
(See 24.1 [lib.iterator.requirements].) The name of this member variable
is shown for exposition only. --end note]

why, in other termns, if the current reverse iterator follows strictly
the former in the implementation, shouldn't now follow the latter?

I see, the additional member variable we don't like it ;) ...

Thanks again,
Paolo.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]