ndn::SimpleTag< T, TypeId > Class Template Reference

Provides a tag type for simple types. More...

#include <ndn-cxx/tag.hpp>

+ Inheritance diagram for ndn::SimpleTag< T, TypeId >:
+ Collaboration diagram for ndn::SimpleTag< T, TypeId >:

Public Member Functions

constexpr SimpleTag (const T &value) noexcept
 Explicitly convertible from T. More...
 
constexpr const T & get () const noexcept
 Returns the enclosed value. More...
 
 operator T () const
 Implicitly convertible to T. More...
 

Static Public Member Functions

static constexpr int getTypeId () noexcept
 

Detailed Description

template<typename T, int TypeId>
class ndn::SimpleTag< T, TypeId >

Provides a tag type for simple types.

Template Parameters
Tthe value type
TypeIdthe TypeId

Definition at line 55 of file tag.hpp.

Constructor & Destructor Documentation

◆ SimpleTag()

template<typename T , int TypeId>
constexpr ndn::SimpleTag< T, TypeId >::SimpleTag ( const T &  value)
inlineexplicitconstexprnoexcept

Explicitly convertible from T.

Definition at line 68 of file tag.hpp.

Member Function Documentation

◆ get()

template<typename T , int TypeId>
constexpr const T& ndn::SimpleTag< T, TypeId >::get ( ) const
inlineconstexprnoexcept

Returns the enclosed value.

Definition at line 86 of file tag.hpp.

◆ getTypeId()

template<typename T , int TypeId>
static constexpr int ndn::SimpleTag< T, TypeId >::getTypeId ( )
inlinestaticconstexprnoexcept

Definition at line 59 of file tag.hpp.

◆ operator T()

template<typename T , int TypeId>
ndn::SimpleTag< T, TypeId >::operator T ( ) const
inline

Implicitly convertible to T.

Returns
A copy of the enclosed value.

Definition at line 77 of file tag.hpp.