error: static assertion of the list of messages

This commit is contained in:
Frédéric Mangano-Tarumi 2018-11-13 18:34:36 -05:00
parent 1866dbd1f0
commit 9ed2b82b4a

View File

@ -17,6 +17,8 @@ static const char* messages[] = {
"Overflowing comment data",
};
static_assert(sizeof(messages) / sizeof(*messages) == static_cast<size_t>(ot::status::sentinel));
const char* ot::error_message(ot::status code)
{
if (code == ot::status::standard_error)