Fails to build with GCC 13 with `enum_tags.h:43:44: error: ‘is_array_v’ is not a member of ‘std’; did you mean ‘is_array’` and many subsequent errors: #76
make[2]: Entering directory '/tmp/makepkg/build/easyrpg-tools-git/src/easyrpg-tools/lmu2png'
CXX src/lmu2png-main.o
In file included from /usr/include/lcf/rpg/animation.h:18,
from /usr/include/lcf/rpg/database.h:19,
from /usr/include/lcf/ldb/reader.h:16,
from src/main.cpp:25:
/usr/include/lcf/enum_tags.h: In constructor ‘constexpr lcf::EnumTags<E, N>::EnumTags(const Args& ...)’:
/usr/include/lcf/enum_tags.h:43:44: error: ‘is_array_v’ is not a member of ‘std’; did you mean ‘is_array’?
43 | if constexpr (std::is_array_v<FirstElemT>) {
| ^~~~~~~~~~
| is_array
/usr/include/lcf/enum_tags.h:43:65: error: expected primary-expression before ‘>’ token
43 | if constexpr (std::is_array_v<FirstElemT>) {
| ^
/usr/include/lcf/enum_tags.h:43:66: error: expected primary-expression before ‘)’ token
43 | if constexpr (std::is_array_v<FirstElemT>) {
| ^
/usr/include/lcf/enum_tags.h: At global scope:
/usr/include/lcf/enum_tags.h:110:106: error: expected constructor, destructor, or type conversion before ‘;’ token
110 | EnumTags(ValueType const&, const char*, Next const&...) -> EnumTags<ValueType, (sizeof...(Next) + 2) / 2>;
| ^
/usr/include/lcf/enum_tags.h: In instantiation of ‘constexpr lcf::EnumTags<E, N>::EnumTags(const Args& ...) [with Args = {char [8], char [7], char [7]}; E = lcf::rpg::AnimationTiming::FlashScope; long unsigned int N = 3]’:
/usr/include/lcf/rpg/animationtiming.h:39:3: required from here
/usr/include/lcf/rpg/animationtiming.h:35:72: in ‘constexpr’ expansion of ‘lcf::makeEnumTags<rpg::AnimationTiming::FlashScope, 8, 7, 7>("nothing", "target", "screen")’
/usr/include/lcf/enum_tags.h:50:42: error: no matching function for call to ‘lcf::EnumTags<lcf::rpg::AnimationTiming::FlashScope, 3>::AddTag<0>(const char [8], const char [7], const char [7])’
50 | AddTag<0>(args...);
| ~~~~~~~~~^~~~~~~~~
/usr/include/lcf/enum_tags.h:88:32: note: candidate: ‘template<long unsigned int I, class ... Next> constexpr void lcf::EnumTags<E, N>::AddTag(E, const char*, const Next& ...) [with long unsigned int I = I; Next = {Next ...}; E = lcf::rpg::AnimationTiming::FlashScope; long unsigned int N = 3]’
88 | constexpr void AddTag(E value, const char* name, Next const&...next) noexcept {
| ^~~~~~
/usr/include/lcf/enum_tags.h:88:32: note: template argument deduction/substitution failed:
/usr/include/lcf/enum_tags.h:50:42: note: cannot convert ‘args#0’ (type ‘const char [8]’) to type ‘lcf::rpg::AnimationTiming::FlashScope’
50 | AddTag<0>(args...);
| ~~~~~~~~~^~~~~~~~~
In file included from /usr/include/lcf/rpg/animation.h:20:
/usr/include/lcf/rpg/animationtiming.h:35:72: in ‘constexpr’ expansion of ‘lcf::makeEnumTags<rpg::AnimationTiming::FlashScope, 8, 7, 7>("nothing", "target", "screen")’
/usr/include/lcf/rpg/animationtiming.h:39:17: error: ‘constexpr lcf::EnumTags<E, N>::EnumTags(const Args& ...) [with Args = {char [8], char [7], char [7]}; E = lcf::rpg::AnimationTiming::FlashScope; long unsigned int N = 3]’ called in a constant expression
39 | );
| ^
/usr/include/lcf/enum_tags.h:40:36: note: ‘constexpr lcf::EnumTags<E, N>::EnumTags(const Args& ...) [with Args = {char [8], char [7], char [7]}; E = lcf::rpg::AnimationTiming::FlashScope; long unsigned int N = 3]’ is not usable as a ‘constexpr’ function because:
40 | explicit constexpr EnumTags(Args const&...args) noexcept {
| ^~~~~~~~
/usr/include/lcf/enum_tags.h: In instantiation of ‘constexpr lcf::EnumTags<E, N>::EnumTags(const Args& ...) [with Args = {char [8], char [7], char [7]}; E = lcf::rpg::AnimationTiming::ScreenShake; long unsigned int N = 3]’:
/usr/include/lcf/rpg/animationtiming.h:49:3: required from here
/usr/include/lcf/rpg/animationtiming.h:45:74: in ‘constexpr’ expansion of ‘lcf::makeEnumTags<rpg::AnimationTiming::ScreenShake, 8, 7, 7>("nothing", "target", "screen")’
/usr/include/lcf/enum_tags.h:50:42: error: no matching function for call to ‘lcf::EnumTags<lcf::rpg::AnimationTiming::ScreenShake, 3>::AddTag<0>(const char [8], const char [7], const char [7])’
50 | AddTag<0>(args...);
| ~~~~~~~~~^~~~~~~~~
/usr/include/lcf/enum_tags.h:88:32: note: candidate: ‘template<long unsigned int I, class ... Next> constexpr void lcf::EnumTags<E, N>::AddTag(E, const char*, const Next& ...) [with long unsigned int I = I; Next = {Next ...}; E = lcf::rpg::AnimationTiming::ScreenShake; long unsigned int N = 3]’
88 | constexpr void AddTag(E value, const char* name, Next const&...next) noexcept {
| ^~~~~~
/usr/include/lcf/enum_tags.h:88:32: note: template argument deduction/substitution failed:
/usr/include/lcf/enum_tags.h:50:42: note: cannot convert ‘args#0’ (type ‘const char [8]’) to type ‘lcf::rpg::AnimationTiming::ScreenShake’
50 | AddTag<0>(args...);
| ~~~~~~~~~^~~~~~~~~
/usr/include/lcf/rpg/animationtiming.h:45:74: in ‘constexpr’ expansion of ‘lcf::makeEnumTags<rpg::AnimationTiming::ScreenShake, 8, 7, 7>("nothing", "target", "screen")’
/usr/include/lcf/rpg/animationtiming.h:49:17: error: ‘constexpr lcf::EnumTags<E, N>::EnumTags(const Args& ...) [with Args = {char [8], char [7], char [7]}; E = lcf::rpg::AnimationTiming::ScreenShake; long unsigned int N = 3]’ called in a constant expression
49 | );
| ^
/usr/include/lcf/enum_tags.h:40:36: note: ‘constexpr lcf::EnumTags<E, N>::EnumTags(const Args& ...) [with Args = {char [8], char [7], char [7]}; E = lcf::rpg::AnimationTiming::ScreenShake; long unsigned int N = 3]’ is not usable as a ‘constexpr’ function because:
40 | explicit constexpr EnumTags(Args const&...args) noexcept {
| ^~~~~~~~
/usr/include/lcf/enum_tags.h: In instantiation of ‘constexpr lcf::EnumTags<E, N>::EnumTags(const Args& ...) [with Args = {char [7], char [7]}; E = lcf::rpg::Animation::Scope; long unsigned int N = 2]’:
/usr/include/lcf/rpg/animation.h:39:3: required from here
/usr/include/lcf/rpg/animation.h:36:62: in ‘constexpr’ expansion of ‘lcf::makeEnumTags<rpg::Animation::Scope, 7, 7>("target", "screen")’
/usr/include/lcf/enum_tags.h:50:42: error: no matching function for call to ‘lcf::EnumTags<lcf::rpg::Animation::Scope, 2>::AddTag<0>(const char [7], const char [7])’
50 | AddTag<0>(args...);
| ~~~~~~~~~^~~~~~~~~
/usr/include/lcf/enum_tags.h:88:32: note: candidate: ‘template<long unsigned int I, class ... Next> constexpr void lcf::EnumTags<E, N>::AddTag(E, const char*, const Next& ...) [with long unsigned int I = I; Next = {Next ...}; E = lcf::rpg::Animation::Scope; long unsigned int N = 2]’
88 | constexpr void AddTag(E value, const char* name, Next const&...next) noexcept {
| ^~~~~~
/usr/include/lcf/enum_tags.h:88:32: note: template argument deduction/substitution failed:
/usr/include/lcf/enum_tags.h:50:42: note: cannot convert ‘args#0’ (type ‘const char [7]’) to type ‘lcf::rpg::Animation::Scope’
50 | AddTag<0>(args...);
| ~~~~~~~~~^~~~~~~~~
/usr/include/lcf/rpg/animation.h:36:62: in ‘constexpr’ expansion of ‘lcf::makeEnumTags<rpg::Animation::Scope, 7, 7>("target", "screen")’
/usr/include/lcf/rpg/animation.h:39:17: error: ‘constexpr lcf::EnumTags<E, N>::EnumTags(const Args& ...) [with Args = {char [7], char [7]}; E = lcf::rpg::Animation::Scope; long unsigned int N = 2]’ called in a constant expression
39 | );
| ^
/usr/include/lcf/enum_tags.h:40:36: note: ‘constexpr lcf::EnumTags<E, N>::EnumTags(const Args& ...) [with Args = {char [7], char [7]}; E = lcf::rpg::Animation::Scope; long unsigned int N = 2]’ is not usable as a ‘constexpr’ function because:
40 | explicit constexpr EnumTags(Args const&...args) noexcept {
| ^~~~~~~~
/usr/include/lcf/enum_tags.h: In instantiation of ‘constexpr lcf::EnumTags<E, N>::EnumTags(const Args& ...) [with Args = {char [3], char [7], char [5]}; E = lcf::rpg::Animation::Position; long unsigned int N = 3]’:
/usr/include/lcf/rpg/animation.h:49:3: required from here
/usr/include/lcf/rpg/animation.h:45:68: in ‘constexpr’ expansion of ‘lcf::makeEnumTags<rpg::Animation::Position, 3, 7, 5>("up", "middle", "down")’
/usr/include/lcf/enum_tags.h:50:42: error: no matching function for call to ‘lcf::EnumTags<lcf::rpg::Animation::Position, 3>::AddTag<0>(const char [3], const char [7], const char [5])’
50 | AddTag<0>(args...);
| ~~~~~~~~~^~~~~~~~~
/usr/include/lcf/enum_tags.h:88:32: note: candidate: ‘template<long unsigned int I, class ... Next> constexpr void lcf::EnumTags<E, N>::AddTag(E, const char*, const Next& ...) [with long unsigned int I = I; Next = {Next ...}; E = lcf::rpg::Animation::Position; long unsigned int N = 3]’
88 | constexpr void AddTag(E value, const char* name, Next const&...next) noexcept {
| ^~~~~~
/usr/include/lcf/enum_tags.h:88:32: note: template argument deduction/substitution failed:
/usr/include/lcf/enum_tags.h:50:42: note: cannot convert ‘args#0’ (type ‘const char [3]’) to type ‘lcf::rpg::Animation::Position’
50 | AddTag<0>(args...);
| ~~~~~~~~~^~~~~~~~~
[...]
[...]
[...]
/usr/include/lcf/enum_tags.h:88:32: note: candidate: ‘template<long unsigned int I, class ... Next> constexpr void lcf::EnumTags<E, N>::AddTag(E, const char*, const Next& ...) [with long unsigned int I = I; Next = {Next ...}; E = lcf::rpg::Map::GeneratorTiles; long unsigned int N = 2]’
88 | constexpr void AddTag(E value, const char* name, Next const&...next) noexcept {
| ^~~~~~
/usr/include/lcf/enum_tags.h:88:32: note: template argument deduction/substitution failed:
/usr/include/lcf/enum_tags.h:50:42: note: cannot convert ‘args#0’ (type ‘const char [4]’) to type ‘lcf::rpg::Map::GeneratorTiles’
50 | AddTag<0>(args...);
| ~~~~~~~~~^~~~~~~~~
/usr/include/lcf/rpg/map.h:61:80: in ‘constexpr’ expansion of ‘lcf::makeEnumTags<rpg::Map::GeneratorTiles, 4, 4>("one", "two")’
/usr/include/lcf/rpg/map.h:64:17: error: ‘constexpr lcf::EnumTags<E, N>::EnumTags(const Args& ...) [with Args = {char [4], char [4]}; E = lcf::rpg::Map::GeneratorTiles; long unsigned int N = 2]’ called in a constant expression
64 | );
| ^
/usr/include/lcf/enum_tags.h:40:36: note: ‘constexpr lcf::EnumTags<E, N>::EnumTags(const Args& ...) [with Args = {char [4], char [4]}; E = lcf::rpg::Map::GeneratorTiles; long unsigned int N = 2]’ is not usable as a ‘constexpr’ function because:
40 | explicit constexpr EnumTags(Args const&...args) noexcept {
| ^~~~~~~~
make[2]: *** [Makefile:470: src/lmu2png-main.o] Error 1
make[2]: Leaving directory '/tmp/makepkg/build/easyrpg-tools-git/src/easyrpg-tools/lmu2png'
make[1]: *** [Makefile:325: all] Error 2
make[1]: Leaving directory '/tmp/makepkg/build/easyrpg-tools-git/src/easyrpg-tools/lmu2png'
make: *** [Makefile:332: all-recursive] Error 1
Ahoj,
I build this according to ↗ this recipe.
Build fails for me with
enum_tags.h:43:44: error: ‘is_array_v’ is not a member of ‘std’; did you mean ‘is_array’
and many subsequent errors.Full make output:
easyrpg-tools-build-error.log
Excerpt:
GCC version: 13.2.1
I saw similar errors appeared with GCC updates.
Regards!