Base< elem_type, derived > Struct Template Reference
[Base]

Class for static polymorphism, modelled after the "Curiously Recurring Template Pattern" (CRTP). Used for type-safe downcasting in functions that restrict their input(s) to be classes that are derived from Base (e.g. Mat, Op, Glue, diagview, subview). A Base object can be converted to a Mat object by the unwrap class. More...

#include <Base.hpp>

List of all members.

Public Member Functions

arma_inline const derived & get_ref () const


Detailed Description

template<typename elem_type, typename derived>
struct Base< elem_type, derived >

Class for static polymorphism, modelled after the "Curiously Recurring Template Pattern" (CRTP). Used for type-safe downcasting in functions that restrict their input(s) to be classes that are derived from Base (e.g. Mat, Op, Glue, diagview, subview). A Base object can be converted to a Mat object by the unwrap class.

Definition at line 26 of file Base.hpp.


Member Function Documentation

template<typename elem_type , typename derived >
arma_inline const derived& Base< elem_type, derived >::get_ref (  )  const [inline]