mirror of git://gcc.gnu.org/git/gcc.git
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:
parent
b6334cf4bb
commit
0a9f0ecb4c
|
|
@ -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>
|
2014-07-23 H.J. Lu <hongjiu.lu@intel.com>
|
||||||
|
|
||||||
* config/abi/post/x86_64-linux-gnu/x32/baseline_symbols.txt: Update.
|
* config/abi/post/x86_64-linux-gnu/x32/baseline_symbols.txt: Update.
|
||||||
|
|
|
||||||
|
|
@ -664,22 +664,22 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
||||||
inline namespace string_view_literals
|
inline namespace string_view_literals
|
||||||
{
|
{
|
||||||
|
|
||||||
inline basic_string_view<char>
|
inline constexpr basic_string_view<char>
|
||||||
operator""sv(const char* __str, size_t __len)
|
operator""sv(const char* __str, size_t __len)
|
||||||
{ return basic_string_view<char>{__str, __len}; }
|
{ return basic_string_view<char>{__str, __len}; }
|
||||||
|
|
||||||
#ifdef _GLIBCXX_USE_WCHAR_T
|
#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)
|
operator""sv(const wchar_t* __str, size_t __len)
|
||||||
{ return basic_string_view<wchar_t>{__str, __len}; }
|
{ return basic_string_view<wchar_t>{__str, __len}; }
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef _GLIBCXX_USE_C99_STDINT_TR1
|
#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)
|
operator""sv(const char16_t* __str, size_t __len)
|
||||||
{ return basic_string_view<char16_t>{__str, __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)
|
operator""sv(const char32_t* __str, size_t __len)
|
||||||
{ return basic_string_view<char32_t>{__str, __len}; }
|
{ return basic_string_view<char32_t>{__str, __len}; }
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue