refactor: use std::extent_v instead of std::extent

This commit is contained in:
Jan
2024-03-24 19:45:55 +01:00
parent 3cbdd5b735
commit 4f0ee35740
29 changed files with 112 additions and 115 deletions

View File

@ -19,7 +19,7 @@ std::unique_ptr<CommandsCommonMatchers::matcher_t> CommandsCommonMatchers::Typen
"int",
"long",
};
static_assert(std::extent<decltype(BUILT_IN_TYPE_NAMES)>::value
static_assert(std::extent_v<decltype(BUILT_IN_TYPE_NAMES)>
== static_cast<int>(CommandsParserValueType::BUILT_IN_LAST) - static_cast<int>(CommandsParserValueType::BUILT_IN_FIRST) + 1);
const CommandsMatcherFactory create(labelSupplier);

View File

@ -66,7 +66,7 @@ std::unique_ptr<HeaderCommonMatchers::matcher_t> HeaderCommonMatchers::ArrayDef(
std::unique_ptr<HeaderCommonMatchers::matcher_t> HeaderCommonMatchers::Typename(const supplier_t* labelSupplier)
{
static constexpr const char* BUILT_IN_TYPE_NAMES[]{"unsigned", "char", "short", "int", "long"};
static_assert(std::extent<decltype(BUILT_IN_TYPE_NAMES)>::value
static_assert(std::extent_v<decltype(BUILT_IN_TYPE_NAMES)>
== static_cast<int>(HeaderParserValueType::BUILT_IN_LAST) - static_cast<int>(HeaderParserValueType::BUILT_IN_FIRST) + 1);
const HeaderMatcherFactory create(labelSupplier);