diff options
author | Jonathan Wakely <jwakely@redhat.com> | 2022-12-22 00:23:19 +0000 |
---|---|---|
committer | Jonathan Wakely <jwakely@redhat.com> | 2022-12-22 10:14:52 +0000 |
commit | d2d3826cd4ba78a97a4906054262a9eb90abde1a (patch) | |
tree | 3a3b52359a5867fc7668ea2564dc1fd40d7fb7f9 /gcc | |
parent | ec8f914f572ce45dbf5743c801c6a101e9a785c7 (diff) | |
download | gcc-d2d3826cd4ba78a97a4906054262a9eb90abde1a.zip gcc-d2d3826cd4ba78a97a4906054262a9eb90abde1a.tar.gz gcc-d2d3826cd4ba78a97a4906054262a9eb90abde1a.tar.bz2 |
libstdc++: Define and use variable templates in <chrono>
Thi defines a variable template for the internal __is_duration helper
trait, defines a new __is_time_point_v variable template (to be used in
a subsequent commit), and adds explicit specializations of the standard
chrono::treat_as_floating_point trait for common types.
A fast path is added to chrono::duration_cast for the no-op case where
no conversion is needed.
Finally, some SFINAE constraints are simplified by using the
__enable_if_t alias, or by using variable templates.
libstdc++-v3/ChangeLog:
* include/bits/chrono.h (__is_duration_v, __is_time_point_v):
New variable templates.
(duration_cast): Add simplified definition for noconv case.
(treat_as_floating_point_v): Add explicit specializations.
(duration::operator%=, floor, ceil, round): Simplify SFINAE
constraints.
Diffstat (limited to 'gcc')
0 files changed, 0 insertions, 0 deletions