Struct size_of< Type, std::void_t< decltype(sizeof(Type))> >

Synopsis

#include <src/entt/core/type_traits.hpp>

template<typename Type>
struct size_of<Type, std::void_t<decltype(sizeof(Type))>>
    : std::integral_constant<std::size_t, sizeof(Type)>

Description

A type-only sizeof wrapper that returns 0 where sizeof complains.

Template Parameters

Type - The type of which to return the size.

The - size of the type if sizeof accepts it, 0 otherwise.

Inheritance

Ancestors: std::integral_constant< std::size_t, sizeof(Type)>

Source

Lines 25-28 in src/entt/core/type_traits.hpp.

template<typename Type>
struct size_of<Type, std::void_t<decltype(sizeof(Type))>>
    : std::integral_constant<std::size_t, sizeof(Type)>
{};





Add Discussion

Log in to comment