Tomographer  v1.0a
Tomographer C++ Framework Documentation
Tomographer::Tools::store_if_enabled< T_, enabled > Struct Template Reference

Utility that stores a data type if a compile-time flag is enabled. More...

#include <tomographer/tools/util.h>

+ Inheritance diagram for Tomographer::Tools::store_if_enabled< T_, enabled >:

Public Types

typedef T_ T
 The type we're storing.
 

Public Member Functions

template<typename... Args>
 store_if_enabled (Args...)
 Constructor.
 

Static Public Attributes

static constexpr bool is_enabled = false
 Whether we're storing a value or not – by default no.
 

Detailed Description

template<typename T_, bool enabled>
struct Tomographer::Tools::store_if_enabled< T_, enabled >

Utility that stores a data type if a compile-time flag is enabled.

If enabled is true, then this type defines a public member value of type T.

The constructor always accepts any number of arguments. They are either ignored (if nothing is stored), or relayed on to the value's constructor.

Definition at line 221 of file util.h.


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