CppSerdes  1.0
A serialization/deserialization library designed with embedded systems in mind
bitliterals.h File Reference

Defines string literals for fixed sized types, useful for serdes definitions. For example: Writting "0xAB_u8" would be equivalent to "static_cast<uint8_t>(0xAB)". More...

#include <stdint.h>

Go to the source code of this file.

Namespaces

 serdes
 CppSerdes library namespace.
 
 serdes::literals
 provides fixed size literals, useful when specifying serialization actions to convey exact bit widths
 

Functions

constexpr size_t serdes::literals::operator""_zu (unsigned long long val) noexcept
 ""_zu = size_t
 
constexpr uint8_t serdes::literals::operator""_u8 (unsigned long long val) noexcept
 ""_u8 = uint8_t
 
constexpr uint16_t serdes::literals::operator""_u16 (unsigned long long val) noexcept
 ""_u16 = uint16_t
 
constexpr uint32_t serdes::literals::operator""_u32 (unsigned long long val) noexcept
 ""_u32 = uint32_t
 
constexpr uint64_t serdes::literals::operator""_u64 (unsigned long long val) noexcept
 ""_64 = uint64_t
 
constexpr int8_t serdes::literals::operator""_i8 (unsigned long long val) noexcept
 ""_i8 = int8_t
 
constexpr int16_t serdes::literals::operator""_i16 (unsigned long long val) noexcept
 ""_i16 = int16_t
 
constexpr int32_t serdes::literals::operator""_i32 (unsigned long long val) noexcept
 ""_i32 = int32_t
 
constexpr int64_t serdes::literals::operator""_i64 (unsigned long long val) noexcept
 ""_i64 = int64_t
 

Detailed Description

Defines string literals for fixed sized types, useful for serdes definitions. For example: Writting "0xAB_u8" would be equivalent to "static_cast<uint8_t>(0xAB)".

Author
Darren V Levine (Darre.nosp@m.nVLe.nosp@m.vine@.nosp@m.gmai.nosp@m.l.com)