https://mooseframework.inl.gov
Public Types | Public Member Functions | Static Public Member Functions | List of all members
CompileTimeDerivatives::CTOne< T > Class Template Reference

Template class to represent a "one" value. More...

#include <CompileTimeDerivatives.h>

Inheritance diagram for CompileTimeDerivatives::CTOne< T >:
[legend]

Public Types

typedef CTCleanType< T > ResultType
 

Public Member Functions

 CTOne ()
 
ResultType operator() () const
 
std::string print () const
 
template<CTTag dtag>
auto D () const
 

Static Public Member Functions

static constexpr int precedence ()
 precedence should reflect C++ operator precedence exactly (higher is binding tighter) More...
 
static constexpr bool leftAssociative ()
 left/right associative property should reflect C++ operator properties exactly More...
 

Detailed Description

template<typename T>
class CompileTimeDerivatives::CTOne< T >

Template class to represent a "one" value.

Having oneness associated with a type enables compile time optimizations in some operators.

Definition at line 115 of file CompileTimeDerivatives.h.

Member Typedef Documentation

◆ ResultType

template<typename T >
typedef CTCleanType<T> CompileTimeDerivatives::CTOne< T >::ResultType

Definition at line 119 of file CompileTimeDerivatives.h.

Constructor & Destructor Documentation

◆ CTOne()

template<typename T >
CompileTimeDerivatives::CTOne< T >::CTOne ( )
inline

Definition at line 118 of file CompileTimeDerivatives.h.

118 {}

Member Function Documentation

◆ D()

template<typename T >
template<CTTag dtag>
auto CompileTimeDerivatives::CTOne< T >::D ( ) const
inline

Definition at line 125 of file CompileTimeDerivatives.h.

126  {
127  return CTNull<ResultType>();
128  }

◆ leftAssociative()

static constexpr bool CompileTimeDerivatives::CTBase::leftAssociative ( )
inlinestaticinherited

left/right associative property should reflect C++ operator properties exactly

Definition at line 31 of file CompileTimeDerivatives.h.

31 { return false; }

◆ operator()()

template<typename T >
ResultType CompileTimeDerivatives::CTOne< T >::operator() ( ) const
inline

Definition at line 121 of file CompileTimeDerivatives.h.

121 { return ResultType(1); }

◆ precedence()

static constexpr int CompileTimeDerivatives::CTBase::precedence ( )
inlinestaticinherited

precedence should reflect C++ operator precedence exactly (higher is binding tighter)

Definition at line 29 of file CompileTimeDerivatives.h.

29 { return 0; }

◆ print()

template<typename T >
std::string CompileTimeDerivatives::CTOne< T >::print ( ) const
inline

Definition at line 122 of file CompileTimeDerivatives.h.

122 { return "1"; }

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