Template Class StrongType

Class Documentation

template<typename T, typename Tag>
class StrongType

Class template for creating strong type aliases.

Template Parameters:
  • T – value type

  • Tag – Tag type to disambiguate separate type aliases

Public Functions

inline explicit constexpr StrongType(T value)

Construct from any type.

inline constexpr T &get()

Get non-const reference to underlying value.

inline constexpr T const &get() const

Get const reference to underlying value.

inline explicit constexpr operator T() const

Explicit conversion to underlying type.