Type tags

Enumerations

enum  senf::NoThrow_t { senf::nothrow }
 Type tag selecting non-throwing variant of something. More...
 
enum  senf::NoInit_t { senf::noinit }
 Type tag selecting uninitialized variant of something. More...
 

Detailed Description

Type tags are used to select variants of a member, function, template or constructor. A Type tag always has only a single value which is passed wherever a parameter of that tag's type is needed.

The argument which expects a type-tag value will always be declared in such a way, that it is optional. Examples of type tag use are:

result = object.find<Foo>(); // This call may throw
result = object.find<Foo>(senf::nothrow); // This call will not throw
Of course, this only works with objects which explicitly declare, that they take an optional
senf::NoThrow_t type parameter.

Enumeration Type Documentation

◆ NoInit_t

Type tag selecting uninitialized variant of something.

This tag is used to select the unititialized variant of a member, function, template or constructor (mostly a constructor). An argument of this type is always declared in such a way, that it is optional.

There is only a single value for this type: senf::noinit which is the value to pass wherever an (optional) senf::NoInit_t parameter is requested.

Enumerator
noinit 

Definition at line 69 of file Tags.hh.

◆ NoThrow_t

Type tag selecting non-throwing variant of something.

This tag is used to select the non-throwing variant of a member, function, template or constructor. An argument of this type is always declared in such a way, that it is optional.

There is only a single value for this type: senf::nothrow which is the value to pass wherever an (optional) senf::NoThrow_t parameter is requested.

Enumerator
nothrow 

Definition at line 56 of file Tags.hh.