SofaBuffers C++ 0.12.0
Pure-C++20 SofaBuffers — API Documentation
Loading...
Searching...
No Matches
sofab::detail::WireInt< E, bool > Struct Template Reference

The integer type an element travels as on the wire. More...

#include <sofab.hpp>

Public Types

using type = E
 

Detailed Description

template<typename E, bool = std::is_enum_v<E>>
struct sofab::detail::WireInt< E, bool >

The integer type an element travels as on the wire.

Identity for an integer; the underlying type for an enumeration, whose declared width is what picks the signed or unsigned wire type and the zig-zag transform (MESSAGE_SPEC §1). std::is_signed_v is false for every enumeration, so asking the enum itself would silently answer "unsigned".

The specialization is what makes it lazy: std::conditional_t would instantiate std::underlying_type_t<E> for a plain integer too, and that has no type — every existing integer array would stop compiling.

Template Parameters
EElement type as the caller declared it.

Definition at line 451 of file sofab.hpp.

Member Typedef Documentation

◆ type

template<typename E , bool = std::is_enum_v<E>>
using sofab::detail::WireInt< E, bool >::type = E

Definition at line 451 of file sofab.hpp.


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