Tomographer  v5.2
Tomographer C++ Framework Documentation
Tomographer::Tools::StoreIfEnabled< T_, enabled > Struct Template Reference

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

#include <tomographer/tools/cxxutil.h>

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

Public Types

typedef T_ T
 The type we're storing.
 

Public Member Functions

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

Static Public Attributes

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

Detailed Description

template<typename T_, bool enabled>
struct Tomographer::Tools::StoreIfEnabled< 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. It is not declared constant, and can be used as a regular variable.

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 249 of file cxxutil.h.


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