diff options
author | AnotherTest <ali.mpfard@gmail.com> | 2021-04-10 18:29:06 +0430 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-04-10 21:01:31 +0200 |
commit | a6e448208052c2d03fca53a4061a367b33167d37 (patch) | |
tree | 0d6f84d1257e2af57d28a3102d0622fcf716782b /Userland/Libraries/LibGUI/ItemListModel.h | |
parent | d8d16dea957f15f07ebb08d1578e21d97fc163bc (diff) | |
download | serenity-a6e448208052c2d03fca53a4061a367b33167d37.zip |
AK+Everywhere: Make StdLibExtras templates less wrapper-y
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. :^)
Diffstat (limited to 'Userland/Libraries/LibGUI/ItemListModel.h')
-rw-r--r-- | Userland/Libraries/LibGUI/ItemListModel.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Userland/Libraries/LibGUI/ItemListModel.h b/Userland/Libraries/LibGUI/ItemListModel.h index 8226a51342..30947404d3 100644 --- a/Userland/Libraries/LibGUI/ItemListModel.h +++ b/Userland/Libraries/LibGUI/ItemListModel.h @@ -37,13 +37,13 @@ class ItemListModel : public Model { public: static constexpr auto IsTwoDimensional = requires(Container data) { - requires !IsVoid<ColumnNameListType>::value; + requires !IsVoid<ColumnNameListType>; data.at(0).at(0); data.at(0).size(); }; // Substitute 'void' for a dummy u8. - using ColumnNamesT = typename Conditional<IsVoid<ColumnNameListType>::value, u8, ColumnNameListType>::Type; + using ColumnNamesT = Conditional<IsVoid<ColumnNameListType>, u8, ColumnNameListType>; static NonnullRefPtr<ItemListModel> create(const Container& data, const ColumnNamesT& column_names, const Optional<size_t>& row_count = {}) requires(IsTwoDimensional) { |