diff --git a/include/rapidjson/schema.h b/include/rapidjson/schema.h index 02a6d0f..e28ddf7 100644 --- a/include/rapidjson/schema.h +++ b/include/rapidjson/schema.h @@ -1762,7 +1762,7 @@ struct TokenHelper { template struct TokenHelper { RAPIDJSON_FORCEINLINE static void AppendIndexToken(Stack& documentStack, SizeType index) { - if (sizeof(SizeType) == 4) { + RAPIDJSON_IF_CONSTEXPR (sizeof(SizeType) == 4) { char *buffer = documentStack.template Push(1 + 10); // '/' + uint *buffer++ = '/'; const char* end = internal::u32toa(index, buffer);