-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replace boost::reverse_iterator
with std::reverse_iterator
for proxy-less iterators
#2205
Replace boost::reverse_iterator
with std::reverse_iterator
for proxy-less iterators
#2205
Conversation
Filed as internal issue #USD-7924 |
4bc54ed
to
a5f4e35
Compare
Hm, this also seems to fail on my Linux builds with gcc 6.3.1:
|
I suspect these might resolve themselves (or at least error more consistently) once we remove the |
a5f4e35
to
26a2d21
Compare
Evaluating rebased on top of a PR which replaces the underlying |
26a2d21
to
cd6ee64
Compare
boost::reverse_iterator
with std::reverse_iterator
for proxy-less iterators
cd6ee64
to
fd1bed2
Compare
I'm reducing the scope of this PR to only address the trivial replacement of |
…oxy-less iterators
fd1bed2
to
bf6cba3
Compare
Description of Change(s)
std::reverse_iterator
can be used whenever the underlying iterator'soperator*
returns true references (and not proxy temporary values).The C++ specification states that until C++20,
std::addressof(operator*())
should be used asstd::reverse_iterator
's implementation ofoperator->
. This does not work when the result ofoperator*
is a temporary.For the remaining cases, explicit reverse iterator implementations will be required compilers consistently support the C++20 specification (which is compatible with proxy reference types). This is addressed by #2333.
Fixes Issue(s)
std::reverse_iterator
instead ofboost::reverse_iterator
#2202