Commit 284afd6d authored by Philip Trettner's avatar Philip Trettner
Browse files

gcc fix

parent 9b094fe5
......@@ -141,7 +141,6 @@ template <class ScalarT, class TraitsT>
template <class ScalarT, class TraitsT>
[[nodiscard]] constexpr pos<1, ScalarT> caps_of(hemisphere<1, ScalarT, TraitsT> const& v)
{
static_assert(!std::is_same_v<TraitsT, boundary_no_caps_tag> && "1D hemisphere_boundary_no_caps does not have any caps");
return v.center;
}
......
......@@ -49,7 +49,7 @@ template <int D, class ScalarT>
// default implementation for contains(objA, objB) that works when objA is solid and vertices_of(objB) is defined
template <class A, class B>
[[nodiscard]] constexpr auto contains(A const& a, B const& b, dont_deduce<typename B::scalar_t> eps = static_cast<typename B::scalar_t>(0))
-> enable_if<std::is_same_v<typename object_traits<A>::tag_t, default_object_tag>, decltype(vertices_of(b), false)>
-> enable_if<std::is_same_v<typename object_traits<A>::tag_t, default_object_tag>, decltype((void)vertices_of(b), false)>
{
for (auto const& vertex : vertices_of(b))
if (!contains(a, vertex, eps))
......@@ -227,8 +227,7 @@ template <class ScalarT, class TraitsT>
if constexpr (std::is_same_v<TraitsT, boundary_tag>)
{
if (a - eps > ScalarT(0) && b - eps > ScalarT(0) && c - eps > ScalarT(0)
&& x2 / pow2(a - eps) + y2 / pow2(b - eps) + z2 / pow2(c - eps) < ScalarT(1))
if (a - eps > ScalarT(0) && b - eps > ScalarT(0) && c - eps > ScalarT(0) && x2 / pow2(a - eps) + y2 / pow2(b - eps) + z2 / pow2(c - eps) < ScalarT(1))
return false;
}
......@@ -283,7 +282,7 @@ template <int D, class ScalarT>
template <int D, class ScalarT>
[[nodiscard]] constexpr bool contains(hemisphere_boundary<D, ScalarT> const& s, pos<D, ScalarT> const& p, dont_deduce<ScalarT> eps = ScalarT(0))
{
return contains(boundary_no_caps_of(s), p , eps) || contains(caps_of(s), p, eps);
return contains(boundary_no_caps_of(s), p, eps) || contains(caps_of(s), p, eps);
}
template <int D, class ScalarT>
......
......@@ -1414,7 +1414,7 @@ template <int ObjectD, class ScalarT, int DomainD>
auto axes = array<vec_t, max_axes_count>();
size_t curr_axis = 0;
auto axisDirs = tg::array<vec_t, DomainD>();
[[maybe_unused]] auto axisDirs = tg::array<vec_t, DomainD>();
if constexpr (DomainD == 3)
axisDirs = {vec_t::unit_x, vec_t::unit_y, vec_t::unit_z};
......@@ -1759,7 +1759,7 @@ template <int D, class ScalarT>
}
template <class BaseT>
[[nodiscard]] constexpr auto intersects(pyramid<BaseT> const& p, aabb<3, typename BaseT::scalar_t> const& b) -> decltype(faces_of(p), true)
[[nodiscard]] constexpr auto intersects(pyramid<BaseT> const& p, aabb<3, typename BaseT::scalar_t> const& b) -> decltype((void)faces_of(p), true)
{
// SAT: box faces
if (!intersects(aabb_of(p), b))
......@@ -1800,7 +1800,8 @@ template <class BaseT>
}
}
template <class BaseT>
[[nodiscard]] constexpr auto intersects(pyramid_boundary_no_caps<BaseT> const& p, aabb<3, typename BaseT::scalar_t> const& b) -> decltype(faces_of(p), true)
[[nodiscard]] constexpr auto intersects(pyramid_boundary_no_caps<BaseT> const& p, aabb<3, typename BaseT::scalar_t> const& b)
-> decltype((void)faces_of(p), true)
{
// SAT: box faces
if (!intersects(aabb_of(p), b))
......
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