From 0a9f0ecb4c4693f6d471aff4816c28f141a75edf Mon Sep 17 00:00:00 2001 From: Ed Smith-Rowland <3dw4rd@verizon.net> Date: Fri, 25 Jul 2014 03:47:46 +0000 Subject: [PATCH] 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 --- libstdc++-v3/ChangeLog | 5 +++++ 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 3f2101be715f..4610d6fa38c7 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 * 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 4b1a10789c31..041f7489deb0 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 + inline constexpr basic_string_view operator""sv(const char* __str, size_t __len) { return basic_string_view{__str, __len}; } #ifdef _GLIBCXX_USE_WCHAR_T - inline basic_string_view + inline constexpr basic_string_view operator""sv(const wchar_t* __str, size_t __len) { return basic_string_view{__str, __len}; } #endif #ifdef _GLIBCXX_USE_C99_STDINT_TR1 - inline basic_string_view + inline constexpr basic_string_view operator""sv(const char16_t* __str, size_t __len) { return basic_string_view{__str, __len}; } - inline basic_string_view + inline constexpr basic_string_view operator""sv(const char32_t* __str, size_t __len) { return basic_string_view{__str, __len}; } #endif