[PATCH] Implement std::experimental::sample

Eric Fiselier eric at efcs.ca
Wed Apr 15 18:36:54 PDT 2015


You'll need to use reserved identifiers and guard the definition of `sample` inside a C++14 only block because adding a new definition of could break existing code.


REPOSITORY
  rL LLVM

================
Comment at: include/experimental/algorithm:49
@@ +48,3 @@
+  Distance k = 0;
+  for (; first != last && k < n; ++first, ++k)
+    out[k] = *first;
----------------
We need a void cast like `++first, (void) ++k` to prevent calling a comma operator overload.

http://reviews.llvm.org/D9044

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the cfe-commits mailing list