|
|
template<class C > |
| constexpr auto | m5::stl::size (const C &c) -> decltype(c.size()) |
| | Like std::size C++17 or later.(for container)
|
| |
|
template<typename T , size_t N> |
| constexpr auto | m5::stl::size (const T(&)[N]) noexcept -> size_t |
| | Like std::size C++17 or later.(for raw array)
|
| |
| template<class T > |
| constexpr const T & | m5::stl::clamp (const T &v, const T &low, const T &high) |
| | Like std::clamp C++17 or later.
|
| |
|
template<class T , class Compare > |
| constexpr const T & | m5::stl::clamp (const T &v, const T &low, const T &high, Compare comp) |
| |
| template<typename E > |
| constexpr std::underlying_type< E >::type | m5::stl::to_underlying (const E e) noexcept |
| | Converts an enumeration to its underlying type.(Like std::to_underlying C++23 or later)
|
| |
STL extensions.
Add features that cannot be used depending on the C++ version, etc.
SPDX-FileCopyrightText: 2024 M5Stack Technology CO LTD
SPDX-License-Identifier: MIT