Commit 09321e23 authored by Praetorius, Simon's avatar Praetorius, Simon
Browse files

Remove deprecated type-traits

parent 8a9a9ab4
......@@ -171,9 +171,9 @@ public:
* \param[in] param parametrization function with signature GlobalCoordiante(LocalCoordinate)`
* \param[in] args... additional arguments to construct the local finite-element cache \ref localFECache_
**/
template <class Parametrization, class... Args,
std::enable_if_t<Std::is_callable<Parametrization(LocalCoordinate), GlobalCoordinate>::value, bool> = true>
CurvedGeometry (const ReferenceElement& refElement, Parametrization&& param, Args&&... args)
template <class Param, class... Args,
std::enable_if_t<std::is_invocable_r_v<GlobalCoordinate,Param,LocalCoordinate>, bool> = true>
CurvedGeometry (const ReferenceElement& refElement, Param&& param, Args&&... args)
: CurvedGeometry(Private{}, refElement, std::forward<Args>(args)...)
{
const auto& localInterpolation = localFE_.localInterpolation();
......@@ -634,19 +634,20 @@ public:
public:
template <class... Args>
CurvedGeometry (const ReferenceElement& refElement, std::vector<GlobalCoordinate> vertices, Args&&...)
CurvedGeometry (const ReferenceElement& refElement, std::vector<GlobalCoordinate> vertices,
Args&&...)
: Super(refElement, std::move(vertices))
{}
template <class Parametrization, class... Args,
std::enable_if_t<Std::is_callable<Parametrization(LocalCoordinate), GlobalCoordinate>::value, bool> = true>
CurvedGeometry (const ReferenceElement& refElement, Parametrization&& param, Args&&...)
template <class Param, class... Args,
std::enable_if_t<std::is_invocable_r_v<GlobalCoordinate,Param,LocalCoordinate>, bool> = true>
CurvedGeometry (const ReferenceElement& refElement, Param&& param, Args&&...)
: Super(refElement, std::vector<GlobalCoordinate>{param(refElement.position(0,0))})
{}
template <class Parametrization, class... Args>
CurvedGeometry (GeometryType gt, Parametrization&& param, Args&&...)
: CurvedGeometry(ReferenceElements::general(gt), std::forward<Parametrization>(param))
template <class Param, class... Args>
CurvedGeometry (GeometryType gt, Param&& param, Args&&...)
: CurvedGeometry(ReferenceElements::general(gt), std::forward<Param>(param))
{}
std::optional<LocalCoordinate> checkedLocal (const GlobalCoordinate& globalCoord) const
......
......@@ -71,7 +71,7 @@ public:
using LocalCoordinate = typename LG::LocalCoordinate;
/// type of global coordinates
using GlobalCoordinate = std::result_of_t<LF(typename LG::GlobalCoordinate)>;
using GlobalCoordinate = std::invoke_result_t<LF,typename LG::GlobalCoordinate>;
/// coordinate type
using ctype = typename LocalCoordinate::value_type;
......
......@@ -164,10 +164,10 @@ public:
* \param[in] localFE Local finite-element to use for the parametrization
* \param[in] param parametrization function with signature GlobalCoordinate(LocalCoordinate)`
**/
template <class Parametrization,
std::enable_if_t<Std::is_callable<Parametrization(LocalCoordinate), GlobalCoordinate>::value, bool> = true>
template <class Param,
std::enable_if_t<std::is_invocable_r_v<GlobalCoordinate,Param,LocalCoordinate>, bool> = true>
ParametrizedGeometry (const ReferenceElement& refElement, const LocalFiniteElement& localFE,
Parametrization&& param)
Param&& param)
: refElement_(refElement)
, localFE_(localFE)
{
......@@ -602,7 +602,7 @@ ParametrizedGeometry (Geo::ReferenceElement<I>, const LFE&, std::vector<GlobalCo
-> ParametrizedGeometry<LFE, GlobalCoordinate::dimension>;
template <class I, class LFE, class F,
class Range = std::result_of_t<F(Impl::LocalCoordinate_t<LFE>)>>
class Range = std::invoke_result_t<F,Impl::LocalCoordinate_t<LFE>>>
ParametrizedGeometry (Geo::ReferenceElement<I>, const LFE&, const F&)
-> ParametrizedGeometry<LFE, Range::dimension>;
......@@ -611,7 +611,7 @@ ParametrizedGeometry (GeometryType, const LFE& localFE, std::vector<GlobalCoordi
-> ParametrizedGeometry<LFE, GlobalCoordinate::dimension>;
template <class LFE, class F,
class Range = std::result_of_t<F(Impl::LocalCoordinate_t<LFE>)>>
class Range = std::invoke_result_t<F,Impl::LocalCoordinate_t<LFE>>>
ParametrizedGeometry (GeometryType, const LFE&, const F&)
-> ParametrizedGeometry<LFE, Range::dimension>;
......
......@@ -49,7 +49,7 @@ public:
using Domain = typename Geometry::GlobalCoordinate;
using LocalDomain = typename Geometry::LocalCoordinate;
using Range = std::result_of_t<Functor(Domain)>;
using Range = std::invoke_result_t<Functor,Domain>;
using Signature = Range(LocalDomain);
public:
......
Supports Markdown
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