[PATCH] D151198: [llvm][ADT] Fix invalid `reference` type of depth-first, breadth-first and post order iterators
Jakub Kuderski via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue May 23 07:27:39 PDT 2023
kuhar added inline comments.
================
Comment at: llvm/include/llvm/ADT/BreadthFirstIterator.h:53
using pointer = value_type *;
- using reference = value_type &;
+ using reference = const value_type &;
----------------
Could we add const conditionally, either with some type traits or define `reference` in terms of `decltype(*declval<pointer>())`?
Do you know if it there's any existing use of non-const references with these iterators?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D151198/new/
https://reviews.llvm.org/D151198
More information about the llvm-commits
mailing list