8#ifndef model_TrialExpressionBase_H_
9#define model_TrialExpressionBase_H_
22 template<
typename Derived>
31 return *
static_cast<Derived*
>(
this);
36 return static_cast<Derived*
>(
this);
41 return *
static_cast<const Derived*
>(
this);
46 return static_cast<const Derived*
>(
this);
49 operator const Derived&()
const
57 template<
class T, std::enable_if_t<std::is_base_of_v<TrialExpressionBase<T>,T>,
int> = 0>
58 auto test(
const std::shared_ptr<T>&
t)
60 return std::make_shared<TestExpression<T>>(
t);
62 template<
class T, std::enable_if_t<std::is_base_of_v<TrialExpressionBase<T>,T>,
int> = 0>
63 auto eval(
const std::shared_ptr<T>&
t)
65 return std::make_shared<EvalExpression<T>>(
t);
final point of the source segment t
auto eval(const std::shared_ptr< T > &t)
const Derived & derived() const
const Derived * p_derived() const
TrialExpressionBase(const TrialExpressionBase< Derived > &)=delete
TrialExpressionBase(TrialExpressionBase< Derived > &&)=delete
TrialExpressionBase()=default