[libcxx] r254290 - Last bit of P0006; mark it as complete
Marshall Clow via cfe-commits
cfe-commits at lists.llvm.org
Sun Nov 29 21:39:31 PST 2015
Author: marshall
Date: Sun Nov 29 23:39:30 2015
New Revision: 254290
URL: http://llvm.org/viewvc/llvm-project?rev=254290&view=rev
Log:
Last bit of P0006; mark it as complete
Modified:
libcxx/trunk/include/chrono
libcxx/trunk/test/std/utilities/time/time.traits/time.traits.is_fp/treat_as_floating_point.pass.cpp
libcxx/trunk/www/cxx1z_status.html
Modified: libcxx/trunk/include/chrono
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/chrono?rev=254290&r1=254289&r2=254290&view=diff
==============================================================================
--- libcxx/trunk/include/chrono (original)
+++ libcxx/trunk/include/chrono Sun Nov 29 23:39:30 2015
@@ -26,6 +26,9 @@ duration_cast(const duration<Rep, Period
template <class Rep> struct treat_as_floating_point : is_floating_point<Rep> {};
+template <class Rep> constexpr bool treat_as_floating_point_v
+ = treat_as_floating_point<Rep>::value; // C++17
+
template <class Rep>
struct duration_values
{
@@ -413,6 +416,11 @@ duration_cast(const duration<_Rep, _Peri
template <class _Rep>
struct _LIBCPP_TYPE_VIS_ONLY treat_as_floating_point : is_floating_point<_Rep> {};
+#if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
+template <class _Rep> _LIBCPP_CONSTEXPR bool treat_as_floating_point_v
+ = treat_as_floating_point<_Rep>::value;
+#endif
+
template <class _Rep>
struct _LIBCPP_TYPE_VIS_ONLY duration_values
{
Modified: libcxx/trunk/test/std/utilities/time/time.traits/time.traits.is_fp/treat_as_floating_point.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/utilities/time/time.traits/time.traits.is_fp/treat_as_floating_point.pass.cpp?rev=254290&r1=254289&r2=254290&view=diff
==============================================================================
--- libcxx/trunk/test/std/utilities/time/time.traits/time.traits.is_fp/treat_as_floating_point.pass.cpp (original)
+++ libcxx/trunk/test/std/utilities/time/time.traits/time.traits.is_fp/treat_as_floating_point.pass.cpp Sun Nov 29 23:39:30 2015
@@ -20,6 +20,10 @@ test()
{
static_assert((std::is_base_of<std::is_floating_point<T>,
std::chrono::treat_as_floating_point<T> >::value), "");
+#if TEST_STD_VER > 14
+ static_assert((std::is_base_of<std::is_floating_point<T>,
+ std::chrono::treat_as_floating_point_v<T> >), "");
+#endif
}
struct A {};
Modified: libcxx/trunk/www/cxx1z_status.html
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/www/cxx1z_status.html?rev=254290&r1=254289&r2=254290&view=diff
==============================================================================
--- libcxx/trunk/www/cxx1z_status.html (original)
+++ libcxx/trunk/www/cxx1z_status.html Sun Nov 29 23:39:30 2015
@@ -71,7 +71,7 @@
<tr><td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/n4510">N4510</a></td><td>LWG</td></td><td>Minimal incomplete type support for standard containers, revision 4</td><td>Lenexa</td><td>Complete</td><td>3.6</td></tr>
<tr><td></td><td></td><td></td><td></td><td></td><td></td></tr>
<tr><td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/P0004R1.html">P0004R1</a></td><td>LWG</td><td>Remove Deprecated iostreams aliases.</td><td>Kona</td><td>Complete</td><td>3.8</td></tr>
- <tr><td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/P0006R0.html">P0006R0</a></td><td>LWG</td><td>Adopt Type Traits Variable Templates for C++17.</td><td>Kona</td><td>In progress</td><td></td></tr>
+ <tr><td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/P0006R0.html">P0006R0</a></td><td>LWG</td><td>Adopt Type Traits Variable Templates for C++17.</td><td>Kona</td><td>Complete</td><td>3.8</td></tr>
<tr><td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/P0092R1.html">P0092R1</a></td><td>LWG</td><td>Polishing <chrono></td><td>Kona</td><td>Complete</td><td>3.8</td></tr>
<tr><td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/P0007R1.html">P0007R1</a></td><td>LWG</td><td>Constant View: A proposal for a <tt>std::as_const</tt> helper function template.</td><td>Kona</td><td>Complete</td><td>3.8</td></tr>
<tr><td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/P0156R0.htm" >P0156R0</a></td><td>LWG</td><td>Variadic lock_guard(rev 3).</td><td>Kona</td><td></td><td></td></tr>
More information about the cfe-commits
mailing list