dnkpp / simple-utility Goto Github PK
View Code? Open in Web Editor NEWHome Page: https://dnkpp.github.io/Simple-Utility/
License: Boost Software License 1.0
Home Page: https://dnkpp.github.io/Simple-Utility/
License: Boost Software License 1.0
max
min
minmax
clamp
template <class T>
concept odering_category = std::same_as<T, std::strong_ordering>
|| std::same_as<T, std::weak_ordering>
|| std::same_as<T, std::partial_ordering>;
template <class T, odering_category Alternative>
struct ordering_category_of_or
{
using type = Alternative;
};
template <std::three_way_comparable T, odering_category Alternative>
struct ordering_category_of_or<T, Alternative>
{
using type = std::compare_three_way_result_t<T>;
};
template <class T, class Alternative>
using ordering_category_of_or_t = typename ordering_category_of_or<T, Alternative>::type;
May be useful.
See https://en.cppreference.com/w/cpp/utility/compare/common_comparison_category
template<class T, class Cat>
concept __ComparesAs = std::same_as<std::common_comparison_category_t<T, Cat>, Cat>;
Simple check for integral should be sufficient.
sl::nullables::nullable_traits
must be sl::nullables::traits
May be worth adapting: https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2023/p0870r5.html
As described in C++20 - The complete guide
(P. 50) a related concept should depend on std::convertible_to
.
publishing docs currently fails
A concept, which relaxes the requirement of providing a get
free-function type, and thus not require the type to actually contain objects of its elements (e.g. entt::type_list
).
As as
is meant as an explicit cast, it should only require explicit converion.
Probably a new concept explicitly_convertible
may be useful.
size
ssize
empty
at
abs
ceil
floor
round
trunc
square
sqrt
pow
version should be read from a header file, instead of defining it in the root CMakeLists.txt
file.
plus
minus
multiplies
dividies
modulus
negate
Params need to be decayed when checking for std::integral
concept.
#include "Simple-Utility/nullables/std_pointer.hpp"
must be exchanged with #include "Simple-Utility/nullables/std_pointers.hpp"
Return type has to be replaced with decltype(auto)
. The nullable type itself has knows best, what is save to return, unwrap should trust that.
dereference
addressof
Rethink the implementation. Perhaps even cast to the requested type.
std::invoke
can't be found. Need to add a #include <functional>
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.