string_view: Make the literal operators constexpr like the ctors they call.
authorEd Smith-Rowland <3dw4rd@verizon.net>
Fri, 25 Jul 2014 03:47:46 +0000 (03:47 +0000)
committerEdward Smith-Rowland <emsr@gcc.gnu.org>
Fri, 25 Jul 2014 03:47:46 +0000 (03:47 +0000)
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
libstdc++-v3/include/experimental/string_view

index 3f2101b..4610d6f 100644 (file)
@@ -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.
index 4b1a107..041f748 100644 (file)
@@ -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