[PATCH] D27199: [libcxx] Make std::ignore constexpr

2016-12-13 Thread Anton Bikineev via Phabricator via cfe-commits
AntonBikineev added a comment.

In https://reviews.llvm.org/D27199#619278, @EricWF wrote:

> @AntonBikineev Do you need somebody to commit this for you?


oh, yeah, it would be great. I don't have commit privileges.


https://reviews.llvm.org/D27199



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D27199: [libcxx] Make std::ignore constexpr

2016-12-11 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment.

@AntonBikineev Do you need somebody to commit this for you?


https://reviews.llvm.org/D27199



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D27199: [libcxx] Make std::ignore constexpr

2016-11-30 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists accepted this revision.
mclow.lists added a comment.
This revision is now accepted and ready to land.

This looks good to me.


https://reviews.llvm.org/D27199



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D27199: [libcxx] Make std::ignore constexpr

2016-11-29 Thread Anton Bikineev via Phabricator via cfe-commits
AntonBikineev created this revision.
AntonBikineev added reviewers: mclow.lists, EricWF.
AntonBikineev added a subscriber: cfe-commits.

This addresses DR 2773 .

  // 20.5.2.4, tuple creation functions:
  constexpr unspecified ignore;
  }


https://reviews.llvm.org/D27199

Files:
  include/tuple
  test/std/utilities/tuple/tuple.tuple/tuple.creation/tie.pass.cpp
  www/cxx1z_status.html


Index: www/cxx1z_status.html
===
--- www/cxx1z_status.html
+++ www/cxx1z_status.html
@@ -407,7 +407,7 @@
http://wg21.link/LWG2767;>2767not_fn 
call_wrapper can form invalid typesIssaquahComplete
http://wg21.link/LWG2769;>2769Redundant 
const in the return type of any_cast(const 
any&)IssaquahComplete
http://wg21.link/LWG2771;>2771Broken 
Effects of some basic_string::compare functions in terms of 
basic_string_viewIssaquahComplete
-   http://wg21.link/LWG2773;>2773Making 
std::ignore constexprIssaquah
+   http://wg21.link/LWG2773;>2773Making 
std::ignore constexprIssaquahComplete
http://wg21.link/LWG2777;>2777basic_string_view::copy should 
use char_traits::copyIssaquahComplete
http://wg21.link/LWG2778;>2778basic_string_view is missing 
constexprIssaquah
 
Index: test/std/utilities/tuple/tuple.tuple/tuple.creation/tie.pass.cpp
===
--- test/std/utilities/tuple/tuple.tuple/tuple.creation/tie.pass.cpp
+++ test/std/utilities/tuple/tuple.tuple/tuple.creation/tie.pass.cpp
@@ -22,6 +22,15 @@
 
 #include "test_macros.h"
 
+#if TEST_STD_VER > 14
+template 
+constexpr auto check_ce_ignore(T ignore)
+{
+ignore = 4;
+return ignore;
+}
+#endif
+
 int main()
 {
 {
@@ -40,4 +49,9 @@
 static_assert ( std::get<1>(t) == 1.1, "" );
 }
 #endif
+#if TEST_STD_VER > 14
+{
+constexpr auto t = check_ce_ignore(std::ignore);
+}
+#endif
 }
Index: include/tuple
===
--- include/tuple
+++ include/tuple
@@ -70,7 +70,7 @@
 void swap(tuple&) noexcept(AND(swap(declval(), declval())...));
 };
 
-const unspecified ignore;
+constexpr unspecified ignore;
 
 template  tuple  make_tuple(T&&...); // constexpr in C++14
 template  tuple forward_as_tuple(T&&...) noexcept; // 
constexpr in C++14
@@ -1047,11 +1047,11 @@
 struct __ignore_t
 {
 template 
-_LIBCPP_INLINE_VISIBILITY
+_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
 const __ignore_t& operator=(_Tp&&) const {return *this;}
 };
 
-namespace { const __ignore_t ignore = __ignore_t(); }
+namespace { _LIBCPP_CONSTEXPR_AFTER_CXX14 const __ignore_t 
ignore = __ignore_t(); }
 
 template 
 struct __make_tuple_return_impl


Index: www/cxx1z_status.html
===
--- www/cxx1z_status.html
+++ www/cxx1z_status.html
@@ -407,7 +407,7 @@
 	http://wg21.link/LWG2767;>2767not_fn call_wrapper can form invalid typesIssaquahComplete
 	http://wg21.link/LWG2769;>2769Redundant const in the return type of any_cast(const any&)IssaquahComplete
 	http://wg21.link/LWG2771;>2771Broken Effects of some basic_string::compare functions in terms of basic_string_viewIssaquahComplete
-	http://wg21.link/LWG2773;>2773Making std::ignore constexprIssaquah
+	http://wg21.link/LWG2773;>2773Making std::ignore constexprIssaquahComplete
 	http://wg21.link/LWG2777;>2777basic_string_view::copy should use char_traits::copyIssaquahComplete
 	http://wg21.link/LWG2778;>2778basic_string_view is missing constexprIssaquah
 
Index: test/std/utilities/tuple/tuple.tuple/tuple.creation/tie.pass.cpp
===
--- test/std/utilities/tuple/tuple.tuple/tuple.creation/tie.pass.cpp
+++ test/std/utilities/tuple/tuple.tuple/tuple.creation/tie.pass.cpp
@@ -22,6 +22,15 @@
 
 #include "test_macros.h"
 
+#if TEST_STD_VER > 14
+template 
+constexpr auto check_ce_ignore(T ignore)
+{
+ignore = 4;
+return ignore;
+}
+#endif
+
 int main()
 {
 {
@@ -40,4 +49,9 @@
 static_assert ( std::get<1>(t) == 1.1, "" );
 }
 #endif
+#if TEST_STD_VER > 14
+{
+constexpr auto t = check_ce_ignore(std::ignore);
+}
+#endif
 }
Index: include/tuple
===
--- include/tuple
+++ include/tuple
@@ -70,7 +70,7 @@
 void swap(tuple&) noexcept(AND(swap(declval(), declval())...));
 };
 
-const unspecified ignore;
+constexpr unspecified ignore;
 
 template  tuple  make_tuple(T&&...); // constexpr in C++14
 template  tuple forward_as_tuple(T&&...) noexcept; // constexpr in C++14
@@ -1047,11 +1047,11 @@
 struct __ignore_t
 {
 template 
-_LIBCPP_INLINE_VISIBILITY
+_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
 const __ignore_t& operator=(_Tp&&) const {return *this;}
 };