[PATCH] Proposed resolution for LWG 2369: constexpr max(initializer_list) vs max_element

Eric Fiselier eric at efcs.ca
Thu Apr 30 18:34:27 PDT 2015


LGTM.


================
Comment at: test/std/algorithms/alg.sorting/alg.min.max/minmax_element_comp.pass.cpp:91
@@ +90,3 @@
+    constexpr auto p = std::minmax_element(il, il+8, less());
+    static_assert ( *(p.first)  == 1, "" );
+    static_assert ( *(p.second) == 8, "" );
----------------
You could use C++14's static assert with no error message here :P.

http://reviews.llvm.org/D9409

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






More information about the cfe-commits mailing list