Skip to content

Commit

Permalink
fix: Build break on Ubuntu 2004
Browse files Browse the repository at this point in the history
The code to generate bad namespaces in examples was interacting poorly with auto.
  • Loading branch information
lokitoth committed Feb 15, 2024
1 parent c2c75e3 commit bc710dd
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions vowpalwabbit/fb_parser/tests/read_span_tests.cc
Original file line number Diff line number Diff line change
Expand Up @@ -178,13 +178,15 @@ Offset<fb::ExampleCollection> create_bad_ns_root_collection(
{
if VW_STD17_CONSTEXPR (multiline)
{
auto inner_examples = {create_bad_ns_root_multiex(builder, w, ns_fac)};
// using "auto" here breaks the code coverage build due to template substitution failure
std::vector<Offset<fb::MultiExample>> inner_examples = {create_bad_ns_root_multiex(builder, w, ns_fac)};
return fb::CreateExampleCollection(builder, builder.CreateVector(std::vector<Offset<fb::Example>>()),
builder.CreateVector(inner_examples), multiline);
}
else
{
auto inner_examples = {create_bad_ns_root_example(builder, w, ns_fac)};
// using "auto" here breaks the code coverage build due to template substitution failure
std::vector<Offset<fb::Example>> inner_examples = {create_bad_ns_root_example(builder, w, ns_fac)};
return fb::CreateExampleCollection(builder, builder.CreateVector(inner_examples),
builder.CreateVector(std::vector<Offset<fb::MultiExample>>()), multiline);
}
Expand Down

0 comments on commit bc710dd

Please sign in to comment.