workaround for windows in index_type typetrait

This commit is contained in:
Christopher Lackner 2019-08-21 11:03:27 +02:00
parent a363524a98
commit 3869392f0a

View File

@ -134,6 +134,9 @@ namespace ngcore
private:
template<typename T2>
static constexpr auto check(T2* t) -> typename T2::index_type { return *t; }
// this function is needed for visual because it seems to not lazy evaluate template arguments...
template<typename T2>
static constexpr auto check(T2* t) -> typename enable_if_t<std::is_integral_t<T>> {}
static constexpr auto check(...) -> decltype(std::declval<T>().Size())
{ return decltype(std::declval<T>().Size())(); }
public: