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
This commit is contained in:
Ed Smith-Rowland 2014-07-25 03:47:46 +00:00 committed by Edward Smith-Rowland
parent b6334cf4bb
commit 0a9f0ecb4c
2 changed files with 9 additions and 4 deletions

View 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.

View 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