Fix example

This commit is contained in:
Alexey Milovidov 2022-09-11 01:58:55 +02:00
parent b75d56ad9b
commit 2b6724c5e3

View File

@ -37,7 +37,7 @@ int main(int argc, char ** argv)
std::cerr << applyVisitor(to_string, field) << std::endl;
}
get<Array &>(field).push_back(field);
field.get<Array &>().push_back(field);
std::cerr << applyVisitor(to_string, field) << std::endl;
std::cerr << (field < field2) << std::endl;
@ -71,7 +71,7 @@ int main(int argc, char ** argv)
size_t sum = 0;
for (size_t i = 0; i < n; ++i)
sum += safeGet<const String &>(array[i]).size();
sum += array[i].safeGet<const String &>().size();
watch.stop();
std::cerr << std::fixed << std::setprecision(2)