diff options
| author | Stanislaw Halik <sthalik@misaki.pl> | 2025-02-05 05:17:47 +0100 |
|---|---|---|
| committer | Stanislaw Halik <sthalik@misaki.pl> | 2025-02-05 06:22:43 +0100 |
| commit | ab13ab5f71a5b09de3b9526feca2ed7c564cee7e (patch) | |
| tree | 1699d8de2dd8217b7133b19c1a9878494a2854ca /entity/constraints.hpp | |
| parent | 867a22c2a989b3f3a2bc47044226f5f9df6a59fd (diff) | |
switch to Corrade pair impl from stl
Diffstat (limited to 'entity/constraints.hpp')
| -rw-r--r-- | entity/constraints.hpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/entity/constraints.hpp b/entity/constraints.hpp index 6a5587d5..0bfc2f15 100644 --- a/entity/constraints.hpp +++ b/entity/constraints.hpp @@ -1,8 +1,7 @@ #pragma once #include "compat/limits.hpp" #include "erased-constraints.hpp" -#include <type_traits> -#include <utility> +#include <cr/Pair.h> #include <mg/Vector.h> namespace floormat::entities::limit_detail { @@ -52,7 +51,7 @@ template<typename T> struct range T max = limit_detail::limit_traits<T>::max(); constexpr operator erased_constraints::range() const noexcept; - constexpr operator std::pair<T, T>() const noexcept; + constexpr operator Pair<T, T>() const noexcept; constexpr bool operator==(const range&) const noexcept = default; }; @@ -125,7 +124,7 @@ template<typename T> constexpr range<T>::operator erased_constraints::range() const noexcept { return erased_range_from_range(min, max); } -template<typename T> constexpr range<T>::operator std::pair<T, T>() const noexcept { return { min, max }; } +template<typename T> constexpr range<T>::operator Pair<T, T>() const noexcept { return { min, max }; } template<> struct range<String> { constexpr operator erased_constraints::range() const noexcept { return {}; } }; template<> struct range<StringView> { constexpr operator erased_constraints::range() const noexcept { return {}; } }; |
