HikoGUI
A low latency retained GUI
Loading...
Searching...
No Matches
value_traits.hpp
Go to the documentation of this file.
1
2
3#pragma once
4
5#include "../macros.hpp"
6#include <concepts>
7
11hi_export_module(hikogui.utility.value_traits);
12
13hi_export namespace hi { inline namespace v1 {
14
21template<std::integral T>
22[[nodiscard]] constexpr bool is_integral_value(T const &rhs) noexcept
23{
24 return true;
25}
26
33template<std::floating_point T>
34[[nodiscard]] constexpr bool is_integral_value(T const &rhs) noexcept
35{
36 return static_cast<double>(static_cast<long long>(rhs)) == static_cast<double>(rhs);
37}
38
39}}
40
The HikoGUI namespace.
Definition array_generic.hpp:20
constexpr bool is_integral_value(T const &rhs) noexcept
Check if a value is integral.
Definition value_traits.hpp:22
DOXYGEN BUG.
Definition algorithm_misc.hpp:20