[libcxx-commits] [PATCH] D101922: [libcxx][iterator] adds	`std::ranges::advance`
    Mark de Wever via Phabricator via libcxx-commits 
    libcxx-commits at lists.llvm.org
       
    Thu May  6 08:15:13 PDT 2021
    
    
  
Mordante added inline comments.
================
Comment at: libcxx/include/__iterator/primitives.h:56
+      return;
+    } else {
+      // Otherwise, if `n` is non-negative, increments `i` by `n`.
----------------
cjdb wrote:
> Mordante wrote:
> > Can you remove the `else`?
> This is an `if constexpr` else, which prunes the false case from the codegen when the true path is generated.
Good point. I'm too used commenting on a 'return else' sequence ;-)
Repository:
  rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D101922/new/
https://reviews.llvm.org/D101922
    
    
More information about the libcxx-commits
mailing list