456{
458 return {};
459
460 if (!e.module().has_value())
461 return {false};
462
463 auto module_toks =
465
466 if (dynamic_cast<const package *>(&e) != nullptr &&
468 module_toks.push_back(e.name());
469 }
470
472 [&e, &module_toks](const auto &modit) {
473 if (std::holds_alternative<std::string>(modit.value())) {
474 const auto &modit_str = std::get<std::string>(modit.value());
475 const auto modit_toks =
476 path::split(modit_str, path_type::kModule);
477
478 return e.module() == modit_str ||
479 util::starts_with(module_toks, modit_toks);
480 }
481
482 return std::get<common::regex>(modit.value()) %= e.module().value();
483 });
484
487 LOG_TRACE(
"Element {} rejected by modules_filter", e.full_name(
false));
488 }
489
490 return result;
491}