History

Ensure a C++ object exists for all static const members of structs or create constexpr functions. - This is an attempt to adhere to the letter of the C++ specification.

arr committed 9 years ago

Commit af5c7a91 parent 4d839d714 files · +86 −64Browse files

Showing the changes to src/include/module_reader.h (1 of 14 files). Show all

Unified · Split

src/include/module_reader.h+3−3
@@ -18,10 +18,10 @@ namespace disvm · 17 unmodified lines
18 static_assert(sizeof(operand_t) == sizeof(runtime::word_t), "Operand and word should be the same size");18 static_assert(sizeof(operand_t) == sizeof(runtime::word_t), "Operand and word should be the same size");
19 static_assert(sizeof(operand_t) == sizeof(runtime::vm_pc_t), "Operand and VM program counter type should be the same size");19 static_assert(sizeof(operand_t) == sizeof(runtime::vm_pc_t), "Operand and VM program counter type should be the same size");
20 20
21 struct magic_number_constants final21 namespace magic_number_constants
22 {22 {
23 static const auto xmagic = operand_t{ 819248 }; // Normal module (0xC8030)23 const auto xmagic = operand_t{ 819248 }; // Normal module (0xC8030)
24 static const auto smagic = operand_t{ 923426 }; // Signed module (0xE1722)24 const auto smagic = operand_t{ 923426 }; // Signed module (0xE1722)
25 };25 };
26 }26 }
27}27}