aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/rtti.c
diff options
context:
space:
mode:
authorJonathan Wakely <jwakely@redhat.com>2020-09-11 19:59:11 +0100
committerJonathan Wakely <jwakely@redhat.com>2020-09-11 19:59:11 +0100
commit53ad6b1979f4bd7121e977c4a44151b14d8a0147 (patch)
treeb9df4a7e55c89def26e5bb75cba2870e2bf1263f /gcc/cp/rtti.c
parent40e99ed5f4e59c6d0a8e81cd6544c9b4e7ec2fe7 (diff)
downloadgcc-53ad6b1979f4bd7121e977c4a44151b14d8a0147.zip
gcc-53ad6b1979f4bd7121e977c4a44151b14d8a0147.tar.gz
gcc-53ad6b1979f4bd7121e977c4a44151b14d8a0147.tar.bz2
libstdc++: Fix chrono::__detail::ceil to work with C++11
In C++11 constexpr functions can only have a return statement, so we need to fix __detail::ceil to make it valid in C++11. This can be done by moving the comparison and increment into a new function, __ceil_impl, and calling that with the result of the duration_cast. This would mean the standard C++17 std::chrono::ceil function would make two further calls, which would add too much overhead when not inlined. For C++17 and later use a using-declaration to add chrono::ceil to namespace __detail. For C++11 and C++14 define chrono::__detail::__ceil as a C++11-compatible constexpr function template. libstdc++-v3/ChangeLog: * include/std/chrono [C++17] (chrono::__detail::ceil): Add using declaration to make chrono::ceil available for internal use with a consistent name. (chrono::__detail::__ceil_impl): New function template. (chrono::__detail::ceil): Use __ceil_impl to compare and increment the value. Remove SFINAE constraint.
Diffstat (limited to 'gcc/cp/rtti.c')
0 files changed, 0 insertions, 0 deletions