Boost C++ Libraries

PrevUpHomeNext
alias
Header
Description
Synopsis

alias

#include <boost/fit/alias.hpp>

Description

The alias class wraps a type with a new type that can be tagged by the user. This allows defining extra attributes about the type outside of the type itself. There are three different ways the value can be stored: as a member variable, by inheritance, or as a static member variable. The value can be retrieved uniformily using the alias_value function.

Synopsis

// Alias the type using a member variable
template<class T, class Tag=void>
class alias;

// Alias the type by inheriting
template<class T, class Tag=void>
class alias_inherit;

// Alias the type using a static variable
template<class T, class Tag=void>
class alias_static;

// Retrieve tag from alias
template<class Alias>
class alias_tag;

// Check if type has a certian tag
template<class T, class Tag>
class has_tag;

// Retrieve value from alias
template<class Alias>
constexpr auto alias_value(Alias&&);