Skip to content

fix(clang): Correct literal operator in string_view.h #572

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions include/EASTL/string_view.h
Original file line number Diff line number Diff line change
Expand Up @@ -694,10 +694,10 @@ namespace eastl
// Temporarily disable the warning until we figure out why it thinks _sv is "at global scope".
EA_DISABLE_CLANG_WARNING(-Wreserved-identifier)
// Backwards compatibility.
EA_CONSTEXPR inline string_view operator "" _sv(const char* str, size_t len) EA_NOEXCEPT { return {str, len}; }
EA_CONSTEXPR inline u16string_view operator "" _sv(const char16_t* str, size_t len) EA_NOEXCEPT { return {str, len}; }
EA_CONSTEXPR inline u32string_view operator "" _sv(const char32_t* str, size_t len) EA_NOEXCEPT { return {str, len}; }
EA_CONSTEXPR inline wstring_view operator "" _sv(const wchar_t* str, size_t len) EA_NOEXCEPT { return {str, len}; }
EA_CONSTEXPR inline string_view operator ""_sv(const char* str, size_t len) EA_NOEXCEPT { return {str, len}; }
EA_CONSTEXPR inline u16string_view operator ""_sv(const char16_t* str, size_t len) EA_NOEXCEPT { return {str, len}; }
EA_CONSTEXPR inline u32string_view operator ""_sv(const char32_t* str, size_t len) EA_NOEXCEPT { return {str, len}; }
EA_CONSTEXPR inline wstring_view operator ""_sv(const wchar_t* str, size_t len) EA_NOEXCEPT { return {str, len}; }
EA_RESTORE_CLANG_WARNING() // -Wreserved-identifier

// C++20 char8_t support.
Expand Down