result_type legacy_visit_def()

in fatal/container/legacy_variant.h [2091:2103]


result_type legacy_visit_def(
  variant<TStoragePolicy, Args...> &&variant,
  visitor_type &&visitor,
  result_type defaultValue,
  UArgs &&...args
) {
  auto wrapper = wrap_visitor<result_type>(visitor);
  variant.visit(wrapper, std::forward<UArgs>(args)...);

  return wrapper.has_value()
    ? std::move(wrapper.value())
    : defaultValue;
}