Utility Rack
Loading...
Searching...
No Matches
include
utility
byte_array.hpp
Go to the documentation of this file.
1
35
#ifndef MAKE_BYTE_ARRAY_HPP_INCLUDED
36
#define MAKE_BYTE_ARRAY_HPP_INCLUDED
37
38
#include <array>
39
#include <cstddef>
// std::byte
40
#include <utility>
// std::forward
41
42
namespace
chops {
43
44
template
<
typename
... Ts>
45
constexpr
std::array<std::byte,
sizeof
...(Ts)> make_byte_array(Ts&&... args)
noexcept
{
46
return
{ std::byte{
static_cast<
std::byte
>
(std::forward<Ts>(args))}... };
47
}
48
49
template
<
typename
std::
size_t
N>
50
constexpr
bool
compare_byte_arrays (
const
std::array<std::byte, N>& lhs,
const
std::array<std::byte, N>& rhs) {
51
return
lhs == rhs;
52
}
53
54
}
// end namespace
55
56
#endif
57
Generated by
1.12.0