Different assert

This commit is contained in:
Alex Beregszaszi 2022-09-27 02:35:27 +02:00
parent 513c34bafe
commit 79704d94de

View File

@ -74,7 +74,7 @@ map<string, ASTPointer<SourceUnit>> ASTJsonImporter::jsonToSourceUnit(map<string
template <typename T, typename... Args>
ASTPointer<T> ASTJsonImporter::createASTNode(Json const& _node, Args&&... _args)
{
static_assert(sizeof(Json::number_integer_t) == sizeof(uint64_t));
static_assert(is_same_v<Json::number_unsigned_t, uint64_t>);
astAssert(member(_node, "id").is_number_integer(), "'id'-field must be 64bit integer.");
int64_t id = static_cast<Json::number_integer_t>(_node["id"]);