aboutsummaryrefslogtreecommitdiff
path: root/libstdc++-v3/include/std/charconv
diff options
context:
space:
mode:
authorJonathan Wakely <jwakely@redhat.com>2020-04-07 17:18:21 +0100
committerJonathan Wakely <jwakely@redhat.com>2020-04-07 17:18:21 +0100
commitc104e8f1b67a75ea82c62f1fd2aac69c09127562 (patch)
tree7f9095c5a83ad79c9fde41cb24572a793f394bf7 /libstdc++-v3/include/std/charconv
parent89b01e86ff8521a0decf292595089e5631cc9320 (diff)
downloadgcc-c104e8f1b67a75ea82c62f1fd2aac69c09127562.zip
gcc-c104e8f1b67a75ea82c62f1fd2aac69c09127562.tar.gz
gcc-c104e8f1b67a75ea82c62f1fd2aac69c09127562.tar.bz2
libstdc++: Restore ability to use <charconv> in C++14 (PR 94520)
This C++17 header is supported in C++14 as a GNU extension, but stopped working last year because I made it depend on an internal helper which is only defined for C++17 and up. PR libstdc++/94520 * include/std/charconv (__integer_to_chars_result_type) (__integer_from_chars_result_type): Use __or_ instead of __or_v_ to allow use in C++14. * testsuite/20_util/from_chars/1.cc: Run test as C++14 and replace use of std::string_view with std::string. * testsuite/20_util/from_chars/2.cc: Likewise. * testsuite/20_util/to_chars/1.cc: Likewise. * testsuite/20_util/to_chars/2.cc: Likewise.
Diffstat (limited to 'libstdc++-v3/include/std/charconv')
-rw-r--r--libstdc++-v3/include/std/charconv12
1 files changed, 6 insertions, 6 deletions
diff --git a/libstdc++-v3/include/std/charconv b/libstdc++-v3/include/std/charconv
index 35f8efc..8c9ce9d 100644
--- a/libstdc++-v3/include/std/charconv
+++ b/libstdc++-v3/include/std/charconv
@@ -68,9 +68,9 @@ namespace __detail
{
template<typename _Tp>
using __integer_to_chars_result_type
- = enable_if_t<__or_v<__is_signed_integer<_Tp>,
- __is_unsigned_integer<_Tp>,
- is_same<char, remove_cv_t<_Tp>>>,
+ = enable_if_t<__or_<__is_signed_integer<_Tp>,
+ __is_unsigned_integer<_Tp>,
+ is_same<char, remove_cv_t<_Tp>>>::value,
to_chars_result>;
// Pick an unsigned type of suitable size. This is used to reduce the
@@ -564,9 +564,9 @@ namespace __detail
template<typename _Tp>
using __integer_from_chars_result_type
- = enable_if_t<__or_v<__is_signed_integer<_Tp>,
- __is_unsigned_integer<_Tp>,
- is_same<char, remove_cv_t<_Tp>>>,
+ = enable_if_t<__or_<__is_signed_integer<_Tp>,
+ __is_unsigned_integer<_Tp>,
+ is_same<char, remove_cv_t<_Tp>>>::value,
from_chars_result>;
} // namespace __detail