[PATCH] D23252: [ADT] Extra STLExtras
    David Blaikie via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Wed Aug 10 10:24:35 PDT 2016
    
    
  
dblaikie added inline comments.
================
Comment at: include/llvm/ADT/STLExtras.h:301
@@ +300,3 @@
+  typedef typename NatList<sizeof...(Args)>::eval nat_list;
+  std::tuple<Args...> ts;
+
----------------
This keeps a copy (or move) of all its arguments to allow for the rvalue case in a range-for loop? That would have surprising performance characteristics (implicit whole-container copies) for non-temporary parameters... 
I think that gets into some pretty major design questions about the behavior here - and the major design problem/question with range proposals in general.
We might need to have a broader discussion about the design for anything like this - might be worth moving that part of the conversation to llvm-dev as I expect it'll be a bit more involved. But maybe here's OK & we can rope a few people in.
Repository:
  rL LLVM
https://reviews.llvm.org/D23252
    
    
More information about the llvm-commits
mailing list