Respecify EnumDescs array sizes manually to workaround clang-3.6 bug

This commit is contained in:
Maxime Coste 2017-08-18 08:15:18 +07:00
parent e0e9b8bae4
commit 65bac9c027
3 changed files with 4 additions and 4 deletions

View File

@ -23,7 +23,7 @@ enum class EolFormat
constexpr auto enum_desc(Meta::Type<EolFormat>) constexpr auto enum_desc(Meta::Type<EolFormat>)
{ {
return make_array<EnumDesc<EolFormat>>({ return make_array<EnumDesc<EolFormat>, 2>({
{ EolFormat::Lf, "lf" }, { EolFormat::Lf, "lf" },
{ EolFormat::Crlf, "crlf" }, { EolFormat::Crlf, "crlf" },
}); });
@ -37,7 +37,7 @@ enum class ByteOrderMark
constexpr auto enum_desc(Meta::Type<ByteOrderMark>) constexpr auto enum_desc(Meta::Type<ByteOrderMark>)
{ {
return make_array<EnumDesc<ByteOrderMark>>({ return make_array<EnumDesc<ByteOrderMark>, 2>({
{ ByteOrderMark::None, "none" }, { ByteOrderMark::None, "none" },
{ ByteOrderMark::Utf8, "utf8" }, { ByteOrderMark::Utf8, "utf8" },
}); });

View File

@ -133,7 +133,7 @@ enum class Autoreload
constexpr auto enum_desc(Meta::Type<Autoreload>) constexpr auto enum_desc(Meta::Type<Autoreload>)
{ {
return make_array<EnumDesc<Autoreload>>({ return make_array<EnumDesc<Autoreload>, 5>({
{ Autoreload::Yes, "yes" }, { Autoreload::Yes, "yes" },
{ Autoreload::No, "no" }, { Autoreload::No, "no" },
{ Autoreload::Ask, "ask" }, { Autoreload::Ask, "ask" },

View File

@ -138,7 +138,7 @@ constexpr bool with_bit_ops(Meta::Type<AutoInfo>) { return true; }
constexpr auto enum_desc(Meta::Type<AutoInfo>) constexpr auto enum_desc(Meta::Type<AutoInfo>)
{ {
return make_array<EnumDesc<AutoInfo>>({ return make_array<EnumDesc<AutoInfo>, 3>({
{ AutoInfo::Command, "command"}, { AutoInfo::Command, "command"},
{ AutoInfo::OnKey, "onkey"}, { AutoInfo::OnKey, "onkey"},
{ AutoInfo::Normal, "normal" } { AutoInfo::Normal, "normal" }