mirror of
https://github.com/NGSolve/netgen.git
synced 2025-02-04 00:50:37 +05:00
workaround for windows in index_type typetrait
This commit is contained in:
parent
a363524a98
commit
3869392f0a
@ -134,6 +134,9 @@ namespace ngcore
|
|||||||
private:
|
private:
|
||||||
template<typename T2>
|
template<typename T2>
|
||||||
static constexpr auto check(T2* t) -> typename T2::index_type { return *t; }
|
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())
|
static constexpr auto check(...) -> decltype(std::declval<T>().Size())
|
||||||
{ return decltype(std::declval<T>().Size())(); }
|
{ return decltype(std::declval<T>().Size())(); }
|
||||||
public:
|
public:
|
||||||
|
Loading…
Reference in New Issue
Block a user