forked from OSchip/llvm-project
parent
12dff9e66a
commit
b8427293df
|
@ -26,6 +26,9 @@ duration_cast(const duration<Rep, Period>& fd);
|
|||
|
||||
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, _Period>& __fd)
|
|||
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
|
||||
{
|
||||
|
|
|
@ -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 {};
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Reference in New Issue