[PATCH] D145025: [ADT] Clean up `enumerate` implementation. NFC.

Jakub Kuderski via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 1 07:37:12 PST 2023


kuhar marked an inline comment as done.
kuhar added inline comments.


================
Comment at: llvm/include/llvm/ADT/STLExtras.h:2200
 
-  result_pair() = default;
   result_pair(std::size_t Index, IterOfRange<R> Iter)
----------------
zero9178 wrote:
> Any reason not having a default constructor is desired? I'd keep it just to avoid someone needing it in the future
`result_pair` is a wrapper around an iterator, and only gets created when there are some iterators to wrap in the first place. Why would we want to define a default constructor for an internal class with no uses in the code base? If there's a legitimate need in the future, I think it can be added back trivially.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D145025/new/

https://reviews.llvm.org/D145025



More information about the llvm-commits mailing list