add Chapter18

This commit is contained in:
Amar Mahmutbegovic
2025-02-06 00:19:59 +01:00
parent 9cc9cc7d73
commit 8634accda5
1533 changed files with 1092521 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
#pragma once
#include <log/env.hpp>
#include <stdx/ct_string.hpp>
#include <utility>
namespace logging {
[[maybe_unused]] constexpr inline struct get_module_t {
template <typename T>
requires true // more constrained
CONSTEVAL auto operator()(T &&t) const noexcept(
noexcept(std::forward<T>(t).query(std::declval<get_module_t>())))
-> decltype(std::forward<T>(t).query(*this)) {
return std::forward<T>(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)