mirror of
https://github.com/NGSolve/netgen.git
synced 2025-01-27 05:10:34 +05:00
more constexpr
This commit is contained in:
parent
c3e27a1792
commit
6f8e4e9f5f
@ -100,7 +100,7 @@ namespace ngcore
|
||||
|
||||
namespace detail {
|
||||
template <typename T, typename Tmin, typename Tmax>
|
||||
inline static void CheckRange(const char * s, const T& n, Tmin first, Tmax next)
|
||||
inline static constexpr void CheckRange(const char * s, const T& n, Tmin first, Tmax next)
|
||||
{
|
||||
if constexpr (!IsSafe<decltype(n)>())
|
||||
if (n<first || n>=next)
|
||||
@ -108,7 +108,7 @@ namespace ngcore
|
||||
}
|
||||
|
||||
template <typename Ta, typename Tb>
|
||||
inline static void CheckSame(const char * s, const Ta& a, const Tb& b)
|
||||
inline static constexpr void CheckSame(const char * s, const Ta& a, const Tb& b)
|
||||
{
|
||||
if constexpr (!IsSafe<decltype(a)>() || !IsSafe<decltype(b)>())
|
||||
if(a != b)
|
||||
|
Loading…
Reference in New Issue
Block a user