diff options
author | Richard Guenther <rguenther@suse.de> | 2016-11-14 15:42:40 +0100 |
---|---|---|
committer | Richard Guenther <rguenther@suse.de> | 2016-11-14 15:42:40 +0100 |
commit | ca94f8c64654980144e88fb19b04adf5f023aa55 (patch) | |
tree | ef90f8461d210f78e7f7b0ba89923a5eda7b3758 /libstdc++-v3/include/std/string_view | |
parent | 9e872f3fe8b4f6624e2edf5ee55a833e53f290c8 (diff) | |
parent | 5dc46e164993bbf658f61069823a1b37a2d715eb (diff) | |
download | gcc-gimplefe.tar.gz |
Merge remote-tracking branch 'trunk' of git://gcc.gnu.org/git/gcc into gimplefegimplefe
Diffstat (limited to 'libstdc++-v3/include/std/string_view')
-rw-r--r-- | libstdc++-v3/include/std/string_view | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/libstdc++-v3/include/std/string_view b/libstdc++-v3/include/std/string_view index b2d2a296ba4..cf728dd83e9 100644 --- a/libstdc++-v3/include/std/string_view +++ b/libstdc++-v3/include/std/string_view @@ -640,6 +640,36 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { }; #endif + inline namespace literals + { + inline namespace string_view_literals + { + _GLIBCXX_BEGIN_NAMESPACE_VERSION + + 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 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 constexpr basic_string_view<char16_t> + operator""sv(const char16_t* __str, size_t __len) + { return basic_string_view<char16_t>{__str, __len}; } + + 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 + + _GLIBCXX_END_NAMESPACE_VERSION + } // namespace string_literals + } // namespace literals + _GLIBCXX_END_NAMESPACE_VERSION } // namespace std |