MGIS 3.1.0
Loading...
Searching...
No Matches
FunctionConcept.ixx File Reference

Implementation of the helpers associated with the FunctionConcept concept. More...

Namespaces

namespace  mgis
 the namespace mgis encloses all the MGIS project.

Functions

template<FunctionConcept FunctionType>
requires (!EvaluatorConcept<FunctionType>)
constexpr decltype(auto) mgis::function::internals::disambiguateGetSpace (const FunctionType &f)
 This helper function allows to disambiguate the call to the getSpace function.
template<FunctionConcept FunctionType>
requires (!EvaluatorConcept<FunctionType>)
constexpr mgis::size_type mgis::function::internals::disambiguateGetNumberOfComponents (const FunctionType &f)
 This helper function allows to disambiguate the call to the getNumberOfComponents function.
template<EvaluatorConcept EvaluatorType, ViewableFunctionArgumentConcept FunctionType>
requires ( std::same_as<evaluator_space<EvaluatorType>, function_space<std::decay_t<FunctionType>>>)
bool mgis::function::operator| (EvaluatorType e, FunctionType &&f)
 assign an evaluator to a mutable function

Detailed Description

Implementation of the helpers associated with the FunctionConcept concept.

Author
Thomas Helfer
Date
14/05/2025

Function Documentation

◆ disambiguateGetNumberOfComponents()

template<FunctionConcept FunctionType>
requires (!EvaluatorConcept<FunctionType>)
mgis::size_type mgis::function::internals::disambiguateGetNumberOfComponents ( const FunctionType & f)
constexpr

This helper function allows to disambiguate the call to the getNumberOfComponents function.

forwards the call to the getNumberOfComponents function

Template Parameters
FunctionTypefunction type
Parameters
[in]ffunction
Returns
the number of components of the values returned by the function

◆ disambiguateGetSpace()

template<FunctionConcept FunctionType>
requires (!EvaluatorConcept<FunctionType>)
decltype(auto) mgis::function::internals::disambiguateGetSpace ( const FunctionType & f)
constexpr

This helper function allows to disambiguate the call to the getSpace function.

forwards the call to the getSpace function of the function

Template Parameters
FunctionTypefunction type
Parameters
[in]ffunction
Returns
the space on which the function is defined

◆ operator|()

template<EvaluatorConcept EvaluatorType, ViewableFunctionArgumentConcept FunctionType>
requires ( std::same_as<evaluator_space<EvaluatorType>, function_space<std::decay_t<FunctionType>>>)
bool mgis::function::operator| ( EvaluatorType e,
FunctionType && f )
nodiscard

assign an evaluator to a mutable function

implementation of the operator| which assigns the values computed by an evaluator to the values of a function

Template Parameters
EvaluatorTypeevaluator type
FunctionTypetype of the function, which may be a qualified type (reference, const, etc...)
Parameters
[in]eevaluator
[in,out]ffunction
Returns
true if the assignment succeeded
Note
the errors detected during the assignment are reported by a default constructed Context object, which is not returned to the caller.