diff options
author | Ed Smith-Rowland <3dw4rd@verizon.net> | 2014-07-25 03:47:46 +0000 |
---|---|---|
committer | Edward Smith-Rowland <emsr@gcc.gnu.org> | 2014-07-25 03:47:46 +0000 |
commit | 0a9f0ecb4c4693f6d471aff4816c28f141a75edf (patch) | |
tree | 8a5b204f7dcf4f8d073ab0179dce31210ec38ea0 | |
parent | b6334cf4bbf19668d1a5626e651653e6318f3ba0 (diff) | |
download | gcc-0a9f0ecb4c4693f6d471aff4816c28f141a75edf.zip gcc-0a9f0ecb4c4693f6d471aff4816c28f141a75edf.tar.gz gcc-0a9f0ecb4c4693f6d471aff4816c28f141a75edf.tar.bz2 |
string_view: Make the literal operators constexpr like the ctors they call.
2014-07-25 Ed Smith-Rowland <3dw4rd@verizon.net>
* include/experimental/string_view: Make the literal operators
constexpr like the ctors they call.
From-SVN: r213037
-rw-r--r-- | libstdc++-v3/ChangeLog | 5 | ||||
-rw-r--r-- | libstdc++-v3/include/experimental/string_view | 8 |
2 files changed, 9 insertions, 4 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 3f2101b..4610d6f 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,8 @@ +2014-07-25 Ed Smith-Rowland <3dw4rd@verizon.net> + + * include/experimental/string_view: Make the literal operators + constexpr like the ctors they call. + 2014-07-23 H.J. Lu <hongjiu.lu@intel.com> * config/abi/post/x86_64-linux-gnu/x32/baseline_symbols.txt: Update. diff --git a/libstdc++-v3/include/experimental/string_view b/libstdc++-v3/include/experimental/string_view index 4b1a107..041f748 100644 --- a/libstdc++-v3/include/experimental/string_view +++ b/libstdc++-v3/include/experimental/string_view @@ -664,22 +664,22 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION inline namespace string_view_literals { - inline basic_string_view<char> + inline constexpr basic_string_view<char> operator""sv(const char* __str, size_t __len) { return basic_string_view<char>{__str, __len}; } #ifdef _GLIBCXX_USE_WCHAR_T - inline basic_string_view<wchar_t> + inline constexpr basic_string_view<wchar_t> operator""sv(const wchar_t* __str, size_t __len) { return basic_string_view<wchar_t>{__str, __len}; } #endif #ifdef _GLIBCXX_USE_C99_STDINT_TR1 - inline basic_string_view<char16_t> + inline constexpr basic_string_view<char16_t> operator""sv(const char16_t* __str, size_t __len) { return basic_string_view<char16_t>{__str, __len}; } - inline basic_string_view<char32_t> + inline constexpr basic_string_view<char32_t> operator""sv(const char32_t* __str, size_t __len) { return basic_string_view<char32_t>{__str, __len}; } #endif |