Phoebe developer's documentation  1.1.0
Phonon and Electron Boltzmann Equations
NamedType< T, Parameter > Class Template Reference

Class for implementing strong typing. More...

#include <utilities.h>

Public Member Functions

 NamedType (T const &value)
 
T & get ()
 
T const & get () const
 

Detailed Description

template<typename T, typename Parameter>
class NamedType< T, Parameter >

In fact, when using the methods (de)compress2(3)indices, it's easy to mix the order of indices. This class can be used to enforce the type of the index, without incurring in a penalty in the code speed. Taken from https://www.fluentcpp.com/2017/05/05/news-strong-types-are-free/