serenity/AK
Brian Gianforcaro 31e1b08e15 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 :).
2021-02-24 14:38:31 +01:00
..
Tests AK: Add support for AK::StringView literals with operator""sv 2021-02-24 14:38:31 +01:00
AllOf.h AK: Publish all_of() 2021-02-17 15:22:21 +01:00
AnyOf.h AK: Publish AK::any_of by default 2021-02-07 11:35:08 +01:00
Array.h Everywhere: Rename ASSERT => VERIFY 2021-02-23 20:56:54 +01:00
Assertions.h Everywhere: Remove unused RELEASE_ASSERT macro 2021-02-23 21:11:53 +01:00
Atomic.h Kernel: Add safe atomic functions 2021-01-17 20:30:31 +01:00
Badge.h
Base64.cpp
Base64.h Everywhere: Remove unnecessary headers 3/4 2021-02-08 18:03:57 +01:00
BinarySearch.h Everywhere: Remove unnecessary headers 3/4 2021-02-08 18:03:57 +01:00
Bitmap.h Everywhere: Rename ASSERT => VERIFY 2021-02-23 20:56:54 +01:00
BitStream.h
Buffered.h
ByteBuffer.cpp AK: Alter ByteBuffer to utilise memcmp. 2021-02-21 16:34:51 +01:00
ByteBuffer.h Everywhere: Rename ASSERT => VERIFY 2021-02-23 20:56:54 +01:00
Checked.h Everywhere: Rename ASSERT => VERIFY 2021-02-23 20:56:54 +01:00
CheckedFormatString.h AK: Rename {DBGLN_NO => ENABLE}_COMPILETIME_FORMAT_CHECK 2021-02-24 13:07:57 +01:00
CircularDeque.h Everywhere: Rename ASSERT => VERIFY 2021-02-23 20:56:54 +01:00
CircularDuplexStream.h Everywhere: Rename ASSERT => VERIFY 2021-02-23 20:56:54 +01:00
CircularQueue.h Everywhere: Rename ASSERT => VERIFY 2021-02-23 20:56:54 +01:00
CMakeLists.txt
Concepts.h
Debug.h.in LibLine: Avoid refreshing the entire line when inserting at the end 2021-02-20 22:28:23 +01:00
Demangle.h
DistinctNumeric.h AK: Remove operators && and || from DistinctNumeric 2021-02-12 13:27:48 +01:00
DoublyLinkedList.h Everywhere: Rename ASSERT => VERIFY 2021-02-23 20:56:54 +01:00
Endian.h
FileStream.h Everywhere: Remove unnecessary headers 4/4 2021-02-08 18:03:57 +01:00
Find.h
FlyString.cpp Everywhere: Rename ASSERT => VERIFY 2021-02-23 20:56:54 +01:00
FlyString.h
Format.cpp Everywhere: Rename ASSERT => VERIFY 2021-02-23 20:56:54 +01:00
Format.h AK: Make dbgln_if() avoid evaluating the arguments when disabled 2021-02-24 13:07:28 +01:00
Forward.h AK: Make Nonnull*PtrVector use size_t for indexes 2021-02-20 18:34:32 +01:00
Function.h Everywhere: Rename ASSERT => VERIFY 2021-02-23 20:56:54 +01:00
GenericLexer.cpp Everywhere: Rename ASSERT => VERIFY 2021-02-23 20:56:54 +01:00
GenericLexer.h
HashFunctions.h Everywhere: Fix weird includes 2021-02-08 18:03:57 +01:00
HashMap.h Everywhere: Remove unnecessary headers 4/4 2021-02-08 18:03:57 +01:00
HashTable.h Everywhere: Rename ASSERT => VERIFY 2021-02-23 20:56:54 +01:00
Hex.cpp AK: Use StringBuilder::appendff() instead of appendf() 2021-02-09 19:18:13 +01:00
Hex.h Everywhere: Remove unnecessary headers 3/4 2021-02-08 18:03:57 +01:00
IDAllocator.h Everywhere: Rename ASSERT => VERIFY 2021-02-23 20:56:54 +01:00
InlineLinkedList.h Everywhere: Rename ASSERT => VERIFY 2021-02-23 20:56:54 +01:00
IntrusiveList.h Everywhere: Rename ASSERT => VERIFY 2021-02-23 20:56:54 +01:00
IPv4Address.h Everywhere: Rename ASSERT => VERIFY 2021-02-23 20:56:54 +01:00
IterationDecision.h
Iterator.h AK: Make single pivot quick_sort guarantee a max stack depth of log(n) 2021-02-01 09:52:36 +01:00
JsonArray.h
JsonArraySerializer.h Everywhere: Rename ASSERT => VERIFY 2021-02-23 20:56:54 +01:00
JsonObject.h Everywhere: Rename ASSERT => VERIFY 2021-02-23 20:56:54 +01:00
JsonObjectSerializer.h Everywhere: Rename ASSERT => VERIFY 2021-02-23 20:56:54 +01:00
JsonParser.cpp Everywhere: Remove unnecessary headers 4/4 2021-02-08 18:03:57 +01:00
JsonParser.h
JsonPath.cpp Everywhere: Rename ASSERT => VERIFY 2021-02-23 20:56:54 +01:00
JsonPath.h Everywhere: Rename ASSERT => VERIFY 2021-02-23 20:56:54 +01:00
JsonValue.cpp Everywhere: Rename ASSERT => VERIFY 2021-02-23 20:56:54 +01:00
JsonValue.h Everywhere: Rename ASSERT => VERIFY 2021-02-23 20:56:54 +01:00
kmalloc.h
kstdio.h AK: Remove unused kprintf macro 2021-02-20 17:21:03 +01:00
LexicalPath.cpp AK: Add LexicalPath::relative_path 2021-02-20 15:53:37 +01:00
LexicalPath.h AK: Add LexicalPath::relative_path 2021-02-20 15:53:37 +01:00
LogStream.cpp AK: Use StringBuilder::appendff() instead of appendf() 2021-02-09 19:18:13 +01:00
LogStream.h Everywhere: Deprecate dbg(). 2021-01-23 16:46:26 +01:00
MACAddress.h Everywhere: Rename ASSERT => VERIFY 2021-02-23 20:56:54 +01:00
MappedFile.cpp Everywhere: Rename ASSERT => VERIFY 2021-02-23 20:56:54 +01:00
MappedFile.h
MemMem.h Everywhere: Rename ASSERT => VERIFY 2021-02-23 20:56:54 +01:00
Memory.h
MemoryStream.h Everywhere: Rename ASSERT => VERIFY 2021-02-23 20:56:54 +01:00
NeverDestroyed.h
Noncopyable.h
NonnullOwnPtr.h Everywhere: Rename ASSERT => VERIFY 2021-02-23 20:56:54 +01:00
NonnullOwnPtrVector.h AK: Make Nonnull*PtrVector use size_t for indexes 2021-02-20 18:34:32 +01:00
NonnullPtrVector.h AK: Make Nonnull*PtrVector use size_t for indexes 2021-02-20 18:34:32 +01:00
NonnullRefPtr.h Everywhere: Rename ASSERT => VERIFY 2021-02-23 20:56:54 +01:00
NonnullRefPtrVector.h AK: Make Nonnull*PtrVector use size_t for indexes 2021-02-20 18:34:32 +01:00
NumberFormat.h Everywhere: Remove unnecessary headers 3/4 2021-02-08 18:03:57 +01:00
NumericLimits.h
Optional.h Everywhere: Rename ASSERT => VERIFY 2021-02-23 20:56:54 +01:00
OSError.h
OwnPtr.h Everywhere: Rename ASSERT => VERIFY 2021-02-23 20:56:54 +01:00
Platform.h LibGfx: Fix dynamic bitmasks in BMPs 2021-01-30 09:23:18 +01:00
PrintfImplementation.h AK: Clean up includes around printf/vdbgprintf 2021-02-08 18:03:57 +01:00
Queue.h Everywhere: Rename ASSERT => VERIFY 2021-02-23 20:56:54 +01:00
QuickSort.h AK: Make single pivot quick_sort guarantee a max stack depth of log(n) 2021-02-01 09:52:36 +01:00
Random.h
RefCounted.h Everywhere: Rename ASSERT => VERIFY 2021-02-23 20:56:54 +01:00
RefPtr.h Everywhere: Rename ASSERT => VERIFY 2021-02-23 20:56:54 +01:00
Result.h
ScopedValueRollback.h
ScopeGuard.h
ScopeLogger.h LibCpp: Add the beginning of a C++ parser 2021-01-27 21:10:57 +01:00
SIMD.h
Singleton.h Everywhere: Rename ASSERT => VERIFY 2021-02-23 20:56:54 +01:00
SinglyLinkedList.h Everywhere: Rename ASSERT => VERIFY 2021-02-23 20:56:54 +01:00
SinglyLinkedListWithCount.h Everywhere: Remove unnecessary headers 4/4 2021-02-08 18:03:57 +01:00
SourceGenerator.h Everywhere: Rename ASSERT => VERIFY 2021-02-23 20:56:54 +01:00
Span.h Everywhere: Rename ASSERT => VERIFY 2021-02-23 20:56:54 +01:00
StackInfo.cpp Everywhere: Rename ASSERT => VERIFY 2021-02-23 20:56:54 +01:00
StackInfo.h
StdLibExtras.h Everywhere: Rename ASSERT => VERIFY 2021-02-23 20:56:54 +01:00
Stream.h Everywhere: Rename ASSERT => VERIFY 2021-02-23 20:56:54 +01:00
String.cpp Everywhere: Rename ASSERT => VERIFY 2021-02-23 20:56:54 +01:00
String.h AK+Kernel+Userland: Enable some more compiletime format string checks 2021-02-23 13:59:33 +01:00
StringBuilder.cpp Everywhere: Rename ASSERT => VERIFY 2021-02-23 20:56:54 +01:00
StringBuilder.h AK+Kernel+Userland: Enable some more compiletime format string checks 2021-02-23 13:59:33 +01:00
StringImpl.cpp Everywhere: Rename ASSERT => VERIFY 2021-02-23 20:56:54 +01:00
StringImpl.h Everywhere: Rename ASSERT => VERIFY 2021-02-23 20:56:54 +01:00
StringUtils.cpp AK: Add String{,Utils}::to_snakecase() 2021-02-21 19:47:47 +01:00
StringUtils.h AK: Add String{,Utils}::to_snakecase() 2021-02-21 19:47:47 +01:00
StringView.cpp Everywhere: Rename ASSERT => VERIFY 2021-02-23 20:56:54 +01:00
StringView.h AK: Add support for AK::StringView literals with operator""sv 2021-02-24 14:38:31 +01:00
TemporaryChange.h
TestSuite.h Everywhere: Remove unused RELEASE_ASSERT macro 2021-02-23 21:11:53 +01:00
Time.cpp Everywhere: Rename ASSERT => VERIFY 2021-02-23 20:56:54 +01:00
Time.h
Traits.h
Trie.h
TypeCasts.h Everywhere: Rename ASSERT => VERIFY 2021-02-23 20:56:54 +01:00
TypedTransfer.h AK: remove unused and uninteresting return value 2021-02-08 18:03:57 +01:00
TypeList.h
Types.h
URL.cpp
URL.h AK: Add URL::to_string_encoded() 2021-01-31 19:05:55 +01:00
URLParser.cpp AK: Add optional parameter for excluding chars to urlencode() 2021-01-31 19:05:55 +01:00
URLParser.h AK: Add optional parameter for excluding chars to urlencode() 2021-01-31 19:05:55 +01:00
Userspace.h
Utf8View.cpp Everywhere: Rename ASSERT => VERIFY 2021-02-23 20:56:54 +01:00
Utf8View.h
Utf32View.h Everywhere: Rename ASSERT => VERIFY 2021-02-23 20:56:54 +01:00
UUID.cpp Everywhere: Rename ASSERT => VERIFY 2021-02-23 20:56:54 +01:00
UUID.h
Vector.h Everywhere: Rename ASSERT => VERIFY 2021-02-23 20:56:54 +01:00
Weakable.h Everywhere: Rename ASSERT => VERIFY 2021-02-23 20:56:54 +01:00
WeakPtr.h Everywhere: Rename ASSERT => VERIFY 2021-02-23 20:56:54 +01:00