Go to the documentation of this file. 1 #ifndef EAGINE_FILE_MAGIC_NUMBER_HPP
9 #define EAGINE_FILE_MAGIC_NUMBER_HPP
18 class file_magic_number {
22 "File magic number cannot be more than 16 bytes long");
24 const std::array<const char, 16> _magic_number;
26 static constexpr
auto _make_magic_number() -> std::array<const char, 16> {
34 constexpr file_magic_number() noexcept
35 : _magic_number(_make_magic_number()) {}
37 auto is_valid() const noexcept ->
bool {
40 _make_magic_number().data(),
44 auto data() const noexcept -> const
char* {
45 return _magic_number.data();
48 static constexpr
auto size() noexcept ->
span_size_t {
55 #endif // EAGINE_FILE_MAGIC_NUMBER_HPP
value_type
Value tree value element data type enumeration.
Definition: interface.hpp:27
std::ptrdiff_t span_size_t
Signed span size type used by eagine.
Definition: types.hpp:36
Common code is placed in this namespace.
Definition: eagine.hpp:21