Skip to content

Commit 8b6073c

Browse files
committed
Try making the error collector non-constexpr?
1 parent f902c75 commit 8b6073c

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

lib/data/locations.cc

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ namespace grammar
9393
};
9494
};
9595

96-
struct _error_collector
96+
struct error_collector
9797
{
9898
struct _sink
9999
{
@@ -128,17 +128,16 @@ struct _error_collector
128128
}
129129
};
130130

131-
constexpr auto sink() const
131+
auto sink() const
132132
{
133133
return _sink{};
134134
}
135135
};
136-
constexpr auto error_collector = _error_collector();
137136

138137
std::vector<CylinderHead> parseCylinderHeadsString(const std::string& s)
139138
{
140139
auto input = lexy::string_input(s);
141-
auto result = lexy::parse<grammar::chs>(input, error_collector);
140+
auto result = lexy::parse<grammar::chs>(input, error_collector());
142141
if (result.is_error())
143142
{
144143
error(fmt::format("track descriptor parse error: {}",

0 commit comments

Comments
 (0)