summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorBrian Gianforcaro <b.gianfo@gmail.com>2021-02-24 04:50:00 -0800
committerAndreas Kling <kling@serenityos.org>2021-02-24 14:38:31 +0100
commit31e1b08e1587fad0fdc176a6a5d8231d1386a21e (patch)
treed6b9284c71a25837e3325ee6fdea718e87b70a64 /CMakeLists.txt
parenta48d54dfc5a7779e1d8d0e0b4f4b3064c9a403f7 (diff)
downloadserenity-31e1b08e1587fad0fdc176a6a5d8231d1386a21e.zip
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 :).
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt4
1 files changed, 2 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 30edc118cc..3d53990a12 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -80,9 +80,9 @@ else()
endif()
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
- add_compile_options(-fconcepts)
+ add_compile_options(-fconcepts -Wno-literal-suffix)
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
- add_compile_options(-Wno-overloaded-virtual)
+ add_compile_options(-Wno-overloaded-virtual -Wno-user-defined-literals)
endif()
if (ENABLE_ALL_THE_DEBUG_MACROS)