#pragma once #include #include #include namespace logging { [[maybe_unused]] constexpr inline struct get_module_t { template requires true // more constrained CONSTEVAL auto operator()(T &&t) const noexcept( noexcept(std::forward(t).query(std::declval()))) -> decltype(std::forward(t).query(*this)) { return std::forward(t).query(*this); } CONSTEVAL auto operator()(auto &&) const { using namespace stdx::literals; return "default"_ctst; } } get_module; } // namespace logging // NOLINTNEXTLINE(cppcoreguidelines-macro-usage) #define CIB_LOG_MODULE(S) CIB_LOG_ENV(logging::get_module, S)