From 3869392f0a96017d0b586efe433fa20732a78ebf Mon Sep 17 00:00:00 2001 From: Christopher Lackner Date: Wed, 21 Aug 2019 11:03:27 +0200 Subject: [PATCH] workaround for windows in index_type typetrait --- libsrc/core/utils.hpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libsrc/core/utils.hpp b/libsrc/core/utils.hpp index 7f38c948..e18a09f7 100644 --- a/libsrc/core/utils.hpp +++ b/libsrc/core/utils.hpp @@ -134,6 +134,9 @@ namespace ngcore private: template 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 + static constexpr auto check(T2* t) -> typename enable_if_t> {} static constexpr auto check(...) -> decltype(std::declval().Size()) { return decltype(std::declval().Size())(); } public: