From 31e1b08e1587fad0fdc176a6a5d8231d1386a21e Mon Sep 17 00:00:00 2001 From: Brian Gianforcaro Date: Wed, 24 Feb 2021 04:50:00 -0800 Subject: AK: Add support for AK::StringView literals with operator""sv A new operator, operator""sv was added as of C++17 to support string_view literals. This allows string_views to be constructed from string literals and with no runtime cost to find the string length. See: https://en.cppreference.com/w/cpp/string/basic_string_view/operator%22%22sv This change implements that functionality in AK::StringView. We do have to suppress some warnings about implementing reserved operators as we are essentially implementing STL functions in AK as we have no STL :). --- Meta/Lagom/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Meta') diff --git a/Meta/Lagom/CMakeLists.txt b/Meta/Lagom/CMakeLists.txt index 51739f72cd..44aa1ce8c8 100644 --- a/Meta/Lagom/CMakeLists.txt +++ b/Meta/Lagom/CMakeLists.txt @@ -9,7 +9,7 @@ endif() if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-overloaded-virtual") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-overloaded-virtual -Wno-user-defined-literals") if (ENABLE_ADDRESS_SANITIZER) add_definitions(-fsanitize=address -fno-omit-frame-pointer) -- cgit v1.2.3