diff options
author | maxim-yurchuk <maxim-yurchuk@yandex-team.com> | 2024-10-09 12:29:46 +0300 |
---|---|---|
committer | maxim-yurchuk <maxim-yurchuk@yandex-team.com> | 2024-10-09 13:14:22 +0300 |
commit | 9731d8a4bb7ee2cc8554eaf133bb85498a4c7d80 (patch) | |
tree | a8fb3181d5947c0d78cf402aa56e686130179049 /contrib/libs/cxxsupp/libcxxmsvc/.yandex_meta/patches/49-string-view.patch | |
parent | a44b779cd359f06c3ebbef4ec98c6b38609d9d85 (diff) | |
download | ydb-9731d8a4bb7ee2cc8554eaf133bb85498a4c7d80.tar.gz |
publishFullContrib: true for ydb
<HIDDEN_URL>
commit_hash:c82a80ac4594723cebf2c7387dec9c60217f603e
Diffstat (limited to 'contrib/libs/cxxsupp/libcxxmsvc/.yandex_meta/patches/49-string-view.patch')
-rw-r--r-- | contrib/libs/cxxsupp/libcxxmsvc/.yandex_meta/patches/49-string-view.patch | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/contrib/libs/cxxsupp/libcxxmsvc/.yandex_meta/patches/49-string-view.patch b/contrib/libs/cxxsupp/libcxxmsvc/.yandex_meta/patches/49-string-view.patch new file mode 100644 index 0000000000..38852879b4 --- /dev/null +++ b/contrib/libs/cxxsupp/libcxxmsvc/.yandex_meta/patches/49-string-view.patch @@ -0,0 +1,68 @@ +diff --git a/include/string_view b/include/string_view +index dd9239a..81d8c8a 100644 +--- a/include/string_view ++++ b/include/string_view +@@ -216,6 +216,11 @@ namespace std { + # pragma GCC system_header + #endif + ++#ifdef _LIBCPP_COMPILER_MSVC ++#pragma warning ( push ) ++#pragma warning ( disable : 4455 ) ++#endif ++ + _LIBCPP_PUSH_MACROS + #include <__undef_macros> + +@@ -277,6 +282,9 @@ public: + _LIBCPP_INLINE_VISIBILITY + basic_string_view& operator=(const basic_string_view&) _NOEXCEPT = default; + ++ _LIBCPP_CONSTEXPR _LIBCPP_INLINE_VISIBILITY ++ basic_string_view(nullptr_t, size_t) = delete; ++ + _LIBCPP_CONSTEXPR _LIBCPP_INLINE_VISIBILITY + basic_string_view(const _CharT* __s, size_type __len) _NOEXCEPT + : __data(__s), __size(__len) +@@ -319,7 +327,7 @@ public: + basic_string_view(const _CharT* __s) + : __data(__s), __size(_VSTD::__char_traits_length_checked<_Traits>(__s)) {} + +-#if _LIBCPP_STD_VER > 20 ++#if _LIBCPP_STD_VER > 17 + basic_string_view(nullptr_t) = delete; + #endif + +@@ -662,7 +670,8 @@ public: + (data(), size(), __s, __pos, traits_type::length(__s)); + } + +-#if _LIBCPP_STD_VER > 17 ++//WARN: disabled std guards in order to allow using these options without switching to new std ++//#if _LIBCPP_STD_VER > 17 + constexpr _LIBCPP_INLINE_VISIBILITY + bool starts_with(basic_string_view __s) const noexcept + { return size() >= __s.size() && compare(0, __s.size(), __s) == 0; } +@@ -686,9 +695,9 @@ public: + constexpr _LIBCPP_INLINE_VISIBILITY + bool ends_with(const value_type* __s) const noexcept + { return ends_with(basic_string_view(__s)); } +-#endif ++//#endif + +-#if _LIBCPP_STD_VER > 20 ++#if _LIBCPP_STD_VER >= 20 + constexpr _LIBCPP_INLINE_VISIBILITY + bool contains(basic_string_view __sv) const noexcept + { return find(__sv) != npos; } +@@ -952,6 +961,10 @@ inline namespace literals + #endif + _LIBCPP_END_NAMESPACE_STD + ++#ifdef _LIBCPP_COMPILER_MSVC ++#pragma warning ( pop ) ++#endif ++ + _LIBCPP_POP_MACROS + + #endif // _LIBCPP_STRING_VIEW |