4
4
#include < sc/format.hpp>
5
5
#include < sc/fwd.hpp>
6
6
7
+ #include < stdx/compiler.hpp>
7
8
#include < stdx/ct_string.hpp>
8
9
#include < stdx/panic.hpp>
9
10
@@ -35,7 +36,7 @@ template <typename...> inline auto config = null::config{};
35
36
struct default_flavor_t ;
36
37
37
38
template <typename Flavor, typename ... Ts>
38
- constexpr static auto get_config () -> auto & {
39
+ ALWAYS_INLINE constexpr static auto get_config () -> auto & {
39
40
if constexpr (std::same_as<Flavor, default_flavor_t >) {
40
41
return config<Ts...>;
41
42
} else {
@@ -45,7 +46,7 @@ constexpr static auto get_config() -> auto & {
45
46
46
47
template <typename Flavor, level L, typename ModuleId, typename ... Ts,
47
48
typename ... TArgs>
48
- static auto log (TArgs &&...args) -> void {
49
+ FLATTEN ALWAYS_INLINE static auto log (TArgs &&...args) -> void {
49
50
auto &cfg = get_config<Flavor, Ts...>();
50
51
cfg.logger .template log <L, ModuleId>(std::forward<TArgs>(args)...);
51
52
}
@@ -103,7 +104,8 @@ using cib_log_module_id_t = typename logging::module_id_t<"default">::type;
103
104
((expr) ? void (0 ) : CIB_FATAL(" Assertion failure: " #expr))
104
105
105
106
namespace logging {
106
- template <typename Flavor, typename ... Ts> static auto log_version () -> void {
107
+ template <typename Flavor, typename ... Ts>
108
+ ALWAYS_INLINE static auto log_version () -> void {
107
109
auto &l_cfg = get_config<Flavor, Ts...>();
108
110
auto &v_cfg = ::version::config<Ts...>;
109
111
if constexpr (requires {
0 commit comments