My Project
Loading...
Searching...
No Matches
Opm::ConditionalStorage< cond, T > Class Template Reference

A simple class which only stores a given member attribute if a boolean condition is true. More...

#include <ConditionalStorage.hpp>

Public Types

typedef T type
 

Public Member Functions

 ConditionalStorage (const T &v)
 
 ConditionalStorage (T &&v)
 
template<class ... Args>
 ConditionalStorage (Args... args)
 
 ConditionalStorage (const ConditionalStorage &t)
 
 ConditionalStorage (ConditionalStorage &&t)
 
ConditionalStorageoperator= (const ConditionalStorage &v)
 
ConditionalStorageoperator= (ConditionalStorage &&v)
 
const T & operator* () const
 
T & operator* ()
 
const T * operator-> () const
 
T * operator-> ()
 

Static Public Attributes

static constexpr bool condition = cond
 

Detailed Description

template<bool cond, class T>
class Opm::ConditionalStorage< cond, T >

A simple class which only stores a given member attribute if a boolean condition is true.

If the condition is false, nothing is stored and an exception is thrown when trying to access the object.


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