mirror of
https://github.com/mutouyun/cpp-ipc.git
synced 2025-12-07 01:06:45 +08:00
31 lines
554 B
C++
31 lines
554 B
C++
#pragma once
|
|
|
|
#include <cstddef>
|
|
#include <cstdint>
|
|
#include <limits>
|
|
|
|
namespace ipc {
|
|
|
|
// types
|
|
|
|
using byte_t = std::uint8_t;
|
|
|
|
template <std::size_t N>
|
|
struct uint;
|
|
|
|
template <> struct uint<8 > { using type = std::uint8_t ; };
|
|
template <> struct uint<16> { using type = std::uint16_t; };
|
|
template <> struct uint<32> { using type = std::uint32_t; };
|
|
|
|
template <std::size_t N>
|
|
using uint_t = typename uint<N>::type;
|
|
|
|
// constants
|
|
|
|
enum : std::size_t {
|
|
error_count = std::numeric_limits<std::size_t>::max(),
|
|
data_length = 16
|
|
};
|
|
|
|
} // namespace ipc
|