Documentation 6b54b78464
Loading...
Searching...
No Matches

Base vector expression class. More...

#include <vector_expressions.hpp>

Inheritance diagram for VecExpr::CVecExpr< Derived, Scalar >:
[legend]

Public Member Functions

const Derived & derived () const
 Cast the expression to Derived, usually to allow evaluation via operator[].
 

Detailed Description

template<class Derived, class Scalar>
class VecExpr::CVecExpr< Derived, Scalar >

Base vector expression class.

Parameters
[in]Derived- The class that inherits from this one to use the expressions.
[in]Scalar- Associated scalar type, prevents implicit conversions between exprs.
Note
Derived classes must implement operator[], and at least operator= with expressions (that is when they are evaluated). They must also contain a constexpr boolean "StoreAsRef", indicating whether to store them by value (false) or by reference (true), when composing expressions. Expression classes need to be stored by value to allow nested expressions to propagate correctly (i.e. if "Scalar" has its own expression templates). Vector classes should be stored by reference to avoid copies, especially if they allocate memory dynamically.

Member Function Documentation

◆ derived()

template<class Derived , class Scalar >
const Derived & VecExpr::CVecExpr< Derived, Scalar >::derived ( ) const
inline

Cast the expression to Derived, usually to allow evaluation via operator[].


The documentation for this class was generated from the following file: