From 0b14598f89cb0a4602040d5aa7c47f93adb94594 Mon Sep 17 00:00:00 2001 From: Ned Coltman <edward.coltman@iws.uni-stuttgart.de> Date: Fri, 8 May 2020 18:18:23 +0200 Subject: [PATCH] [freeflow][staggeredupwindfluxvars] replace enable_if_t with static assert --- .../navierstokes/staggered/staggeredupwindfluxvariables.hh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dumux/freeflow/navierstokes/staggered/staggeredupwindfluxvariables.hh b/dumux/freeflow/navierstokes/staggered/staggeredupwindfluxvariables.hh index 545fa34c59..c2dbc5c4f3 100644 --- a/dumux/freeflow/navierstokes/staggered/staggeredupwindfluxvariables.hh +++ b/dumux/freeflow/navierstokes/staggered/staggeredupwindfluxvariables.hh @@ -232,10 +232,10 @@ private: * \param ownScvf The sub control volume face * \param selfIsUpstream bool describing upstream face. */ - template<bool enable = useHigherOrder, std::enable_if_t<enable, int> = 0> static std::array<Scalar, 3> getFrontalDistances_(const SubControlVolumeFace& ownScvf, const bool selfIsUpstream) { + static_assert(useHigherOrder, "Should only be reached if higher order methods are enabled"); // Depending on selfIsUpstream the downstream and the (up)upstream distances are saved. // distances {upstream to downstream distance, up-upstream to upstream distance, downstream staggered cell size} std::array<Scalar, 3> distances; @@ -469,11 +469,11 @@ private: * \param localSubFaceIdx The local index of the subface * \param selfIsUpstream bool describing upstream face. */ - template<bool enable = useHigherOrder, std::enable_if_t<enable, int> = 0> static std::array<Scalar, 3> getLateralDistances_(const SubControlVolumeFace& ownScvf, const int localSubFaceIdx, const bool selfIsUpstream) { + static_assert(useHigherOrder, "Should only be reached if higher order methods are enabled"); // distances {upstream to downstream distance, up-upstream to upstream distance, downstream staggered cell size} std::array<Scalar, 3> distances; -- GitLab