diff options
author | Alexey Rusakov <Kitsune-Ral@users.sf.net> | 2022-01-23 17:11:22 +0100 |
---|---|---|
committer | Alexey Rusakov <Kitsune-Ral@users.sf.net> | 2022-01-23 17:12:08 +0100 |
commit | abbab8d8f8c566bc2c9cdf766c6fbb11d978ca47 (patch) | |
tree | 07623282baa91122528a9b553370f8bb6195bfa0 /libquotient.pri | |
parent | 63c953800330017ebb2afbabf41e5c4932c4d640 (diff) | |
download | libquotient-abbab8d8f8c566bc2c9cdf766c6fbb11d978ca47.tar.gz libquotient-abbab8d8f8c566bc2c9cdf766c6fbb11d978ca47.zip |
Omittable: split out from util.h and refresh
Improvements:
- Quotient::lift() - a way to invoke a function on an optional (including
Omittable) or a pointer if it's 'truthy'. Doesn't need enhanced
function_traits<>, only the standard library; works on any number
of arguments that can be dereferenced and casted to bool.
- then() - the version of lift() as a member function.
- edit() was renamed to ensure() (edit() might become a read-write
counterpart of then() at some point). It's not really used across
libQuotient codebase (or elsewhere) but is staying there just in case.
It can also accept an initializer, removing the requirement of
default-constructibility.
- Quotient::merge() is simplified, with one universal implementation
covering both Omittable/optional and plain values.
- All that now lives in its dedicated pair of files, further
decluttering util.h
Diffstat (limited to 'libquotient.pri')
0 files changed, 0 insertions, 0 deletions