mirror of
https://github.com/geode-sdk/geode.git
synced 2024-11-22 15:37:53 -05:00
move convertible_to polyfill to ranges.hpp
This commit is contained in:
parent
550e87377d
commit
f97dbd96ed
2 changed files with 10 additions and 10 deletions
|
@ -11,16 +11,6 @@
|
|||
#include <vector>
|
||||
#include <span>
|
||||
|
||||
#ifndef __cpp_lib_concepts
|
||||
namespace std {
|
||||
// <concepts> isn't working for me lmao
|
||||
template <class From, class To>
|
||||
concept convertible_to = std::is_convertible_v<From, To> && requires {
|
||||
static_cast<To>(std::declval<From>());
|
||||
};
|
||||
}
|
||||
#endif
|
||||
|
||||
namespace geode {
|
||||
#pragma warning(disable : 4251)
|
||||
|
||||
|
|
|
@ -8,6 +8,16 @@
|
|||
#undef min
|
||||
#undef max
|
||||
|
||||
#ifndef __cpp_lib_concepts
|
||||
namespace std {
|
||||
// <concepts> isn't working for me lmao
|
||||
template <class From, class To>
|
||||
concept convertible_to = std::is_convertible_v<From, To> && requires {
|
||||
static_cast<To>(std::declval<From>());
|
||||
};
|
||||
}
|
||||
#endif
|
||||
|
||||
namespace geode::utils::ranges {
|
||||
template <class C>
|
||||
concept ValidConstContainer = requires(C const& c) {
|
||||
|
|
Loading…
Reference in a new issue