+2017-10-24 Jonathan Wakely <jwakely@redhat.com>
+
+ PR libstdc++/82685
+ * include/experimental/string_view (operator""sv): Add noexcept.
+ * include/std/string_view (operator""sv): Likewise.
+
2017-10-23 Jonathan Wakely <jwakely@redhat.com>
* include/Makefile.am: Add new headers for C++17 filesystem library.
inline namespace string_view_literals
{
inline constexpr basic_string_view<char>
- operator""sv(const char* __str, size_t __len)
+ operator""sv(const char* __str, size_t __len) noexcept
{ 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)
+ operator""sv(const wchar_t* __str, size_t __len) noexcept
{ 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)
+ operator""sv(const char16_t* __str, size_t __len) noexcept
{ return basic_string_view<char16_t>{__str, __len}; }
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) noexcept
{ return basic_string_view<char32_t>{__str, __len}; }
#endif
} // namespace string_literals
inline namespace string_view_literals
{
inline constexpr basic_string_view<char>
- operator""sv(const char* __str, size_t __len)
+ operator""sv(const char* __str, size_t __len) noexcept
{ 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)
+ operator""sv(const wchar_t* __str, size_t __len) noexcept
{ 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)
+ operator""sv(const char16_t* __str, size_t __len) noexcept
{ return basic_string_view<char16_t>{__str, __len}; }
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) noexcept
{ return basic_string_view<char32_t>{__str, __len}; }
#endif
} // namespace string_literals