My Project
Public Types | List of all members
bsl::underlying_type< T > Class Template Referencefinal

If T is a complete enumeration type, provides a member typedef type that names the underlying type of T. More...

#include <underlying_type.hpp>

Public Types

using type = __underlying_type(T)
 provides the member typedef "type"
 

Detailed Description

template<typename T>
class bsl::underlying_type< T >

If T is a complete enumeration type, provides a member typedef type that names the underlying type of T.

#ifndef BSL_EXAMPLE_ENUM_HPP
#define BSL_EXAMPLE_ENUM_HPP
#include <bsl/cstdint.hpp>
namespace bsl
{
enum class example_enum : bsl::int32
{
dummy1 = 1,
dummy2 = 2
};
}
#endif
#include <bsl/is_same.hpp>
#include <bsl/debug.hpp>
#include "example_enum.hpp"
namespace bsl
{
inline void
example_underlying_type_overview() noexcept
{
if (bsl::is_same<underlying_type_t<example_enum>, bsl::int32>::value) {
bsl::print() << "success\n";
}
}
}
Template Parameters
Tthe type to query

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