Implement P0426R1 "Constexpr for std::char_traits" for C++17 (partial)
authorJonathan Wakely <jwakely@redhat.com>
Mon, 3 Apr 2017 17:15:53 +0000 (18:15 +0100)
committerJonathan Wakely <redi@gcc.gnu.org>
Mon, 3 Apr 2017 17:15:53 +0000 (18:15 +0100)
commit8c3b5c719f4c837122402f8707cb89b677ee3869
treefa7c526148be6e05e2784374cb256b76b6fb482f
parentbbdf4e815976f26fc32bc270d541deba4c247a3d
Implement P0426R1 "Constexpr for std::char_traits" for C++17 (partial)

* include/bits/char_traits.h (__gnu_cxx::char_traits): Add
_GLIBCXX14_CONSTEXPR on assign, compare, find, and length.
(std::char_traits<char>, std::char_traits<wchar_t>): Add
_GLIBCXX17_CONSTEXPR on assign.
(std::char_traits<char16_t>, std::char_traits<char32_t>): Add
_GLIBCXX17_CONSTEXPR on assign, compare, find, and length.
* testsuite/21_strings/char_traits/requirements/
constexpr_functions_c++17.cc: New test.

From-SVN: r246655
libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/char_traits.h
libstdc++-v3/testsuite/21_strings/char_traits/requirements/constexpr_functions_c++17.cc [new file with mode: 0644]