summaryrefslogtreecommitdiff
path: root/AK/StdLibExtraDetails.h
AgeCommit message (Collapse)Author
2021-12-15AK: Add the concept of hash-compatible typesHendiadyoin1
2021-12-15AK: Add helper to test for pointer and cv-pointer at the same timeHendiadyoin1
2021-12-15AK: Add a Decay helper for ConceptsHendiadyoin1
2021-10-21AK: Add IsPOD<T> template to StdLibExtrasLinus Groh
2021-09-05AK: Add AssertSize utility template to provide rich type size assertionsBrian Gianforcaro
This type is useful, as the sizes will be visible in the compiler error messages, as they will be part of the template parameters. This is not possible with a normal static_assert of the sizeof a type.
2021-08-12AK: Add a IsSpecializationOf<T, Template> type traitAli Mohammad Pur
2021-07-22AK: Add a CommonType<Ts...> type traitAli Mohammad Pur
Also adds a simple-ish test for CommonType.
2021-07-04AK: Add type traits describing supported operationsDaniel Bertalan
This will allow us to make `Optional`, `Variant`, and possibly other data structures conditionally trivially constructible, destructible, copyable or movable based on their type parameters.
2021-07-03AK: Make smart pointer factories work with aggregatesDaniel Bertalan
Aggregate initialization with brace-enclosed parameters is a [C++20 feature][1] not yet implemented by Clang. This caused compile errors if we tried to use the factory functions to create smart pointers to aggregates. As a (temporary) fix, [the LWG's previously proposed solution][2] is implemented by this commit. Now, wherever it's not possible to direct-initialize, aggregate initialization is performed. [1]: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2019/p0960r3.html [2]: http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#2089
2021-06-28AK: Add and use the RemoveCVReference<T> type traitAli Mohammad Pur
2021-06-06AK+Everywhere: Disallow constructing Functions from incompatible typesAli Mohammad Pur
Previously, AK::Function would accept _any_ callable type, and try to call it when called, first with the given set of arguments, then with zero arguments, and if all of those failed, it would simply not call the function and **return a value-constructed Out type**. This lead to many, many, many hard to debug situations when someone forgot a `const` in their lambda argument types, and many cases of people taking zero arguments in their lambdas to ignore them. This commit reworks the Function interface to not include any such surprising behaviour, if your function instance is not callable with the declared argument set of the Function, it can simply not be assigned to that Function instance, end of story.
2021-05-26AK: Define MakeSigned<...>::Type as void in the base structAli Mohammad Pur
This was probably forgotten in the last rewrite, this would make IsIntegeral<T> not work for floating points.
2021-04-22AK+Userland: Use mpfard@serenityos.org for my copyright headersAli Mohammad Pur
2021-04-22Everything: Move to SPDX license identifiers in all files.Brian Gianforcaro
SPDX License Identifiers are a more compact / standardized way of representing file license information. See: https://spdx.dev/resources/use/#identifiers This was done with the `ambr` search and replace tool. ambr --no-parent-ignore --key-from-file --rep-from-file key.txt rep.txt *
2021-04-10AK+Everywhere: Make StdLibExtras templates less wrapper-yAnotherTest
This commit makes the user-facing StdLibExtras templates and utilities arguably more nice-looking by removing the need to reach into the wrapper structs generated by them to get the value/type needed. The C++ standard library had to invent `_v` and `_t` variants (likely because of backwards compat), but we don't need to cater to any codebase except our own, so might as well have good things for free. :^)