This is an archive of the discontinued LLVM Phabricator instance.

VarStreamArrayIterator needed non-const operator* overload
ClosedPublic

Authored by amccarth on Apr 19 2017, 11:17 AM.

Details

Summary

Without this change, the operator-> provided by iterator_facade lost type qualifiers.

Diff Detail

Event Timeline

amccarth created this revision.Apr 19 2017, 11:17 AM

iterator_facade_base is already supposed to provide operator-> when you supply operator*. Looking into this offline together, it seems the type checker is tripping over the const ValueType on line 160, and that providing a non-const operator* may fix that.

amccarth updated this revision to Diff 95998.Apr 20 2017, 11:47 AM

Better solution after discussion with inglorion and zturner.

amccarth retitled this revision from Add `operator->` overload to VarStreamArrayIterator to VarStreamArrayIterator needed non-const operator* overload.Apr 20 2017, 11:48 AM
amccarth edited the summary of this revision. (Show Details)
amccarth added a reviewer: inglorion.
This revision is now accepted and ready to land.Apr 20 2017, 12:34 PM
This revision was automatically updated to reflect the committed changes.