move convertible_to polyfill to ranges.hpp

This commit is contained in:
mat 2022-12-12 17:36:19 -03:00 committed by GitHub
parent 550e87377d
commit f97dbd96ed
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 10 deletions

View file

@ -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)

View file

@ -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) {