Commit 2f294629 authored by Philip Trettner's avatar Philip Trettner
Browse files

fixed always_false for clang 12

parent 72d19987
......@@ -51,6 +51,9 @@ constexpr bool can_apply = detail::can_apply<Z, void, Ts...>::value;
template <class...>
constexpr bool always_false = false;
/// same as always_false, but for non-type template parameters, e.g. always_false_v<Dimension>
template <auto...>
constexpr bool always_false_v = false;
template <class...>
using void_t = void;
......
......@@ -64,7 +64,7 @@ template <class ScalarT, int D>
}
else
{
static_assert(tg::always_false<D>, "unsupported dimension");
static_assert(always_false_v<D>, "unsupported dimension");
return {};
}
}
......@@ -95,7 +95,7 @@ template <class ScalarT, int D>
}
else
{
static_assert(tg::always_false<D>, "unsupported dimension");
static_assert(always_false_v<D>, "unsupported dimension");
return {};
}
}
......@@ -124,7 +124,7 @@ template <class ScalarT, int D>
}
else
{
static_assert(tg::always_false<D>, "unsupported dimension");
static_assert(always_false_v<D>, "unsupported dimension");
return {};
}
}
......
......@@ -492,7 +492,7 @@ template <int ObjectD, class ScalarT, int DomainD, class Rng>
else if constexpr (ObjectD == 4)
coeffs = {ls.y * ls.z * ls.w, ls.x * ls.z * ls.w, ls.x * ls.y * ls.w, ls.x * ls.y * ls.z};
else
static_assert(always_false<ObjectD>, "dimension not supported");
static_assert(always_false_v<ObjectD>, "dimension not supported");
auto probMax = max_element(coeffs);
......
......@@ -364,6 +364,6 @@ constexpr void introspect(I&& i, quadric<D, ScalarT>& v)
i(v.c, "c");
}
else
static_assert(always_false<D>, "quadrics are only defined for 2D and 3D");
static_assert(always_false_v<D>, "quadrics are only defined for 2D and 3D");
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment