Simplify by replacing is_convertible_to_sv with string_view_t param

This commit is contained in:
gabime 2023-09-15 22:28:01 +03:00
parent 3eea04bcd3
commit 5882bfd0ad

View File

@ -193,38 +193,32 @@ void critical(loc_with_fmt fmt, Args &&...args)
} }
// log functions with no format string, just string // log functions with no format string, just string
template<typename S, typename = is_convertible_to_sv<S>> void trace(string_view_t msg, source_loc loc = source_loc::current())
void trace(const S msg, source_loc loc = source_loc::current())
{ {
log(loc, level::trace, msg); log(loc, level::trace, msg);
} }
template<typename S, typename = is_convertible_to_sv<S>> void debug(string_view_t msg, source_loc loc = source_loc::current())
void debug(const S msg, source_loc loc = source_loc::current())
{ {
log(loc, level::debug, msg); log(loc, level::debug, msg);
} }
template<typename S, typename = is_convertible_to_sv<S>> void info(string_view_t msg, source_loc loc = source_loc::current())
void info(const S msg, source_loc loc = source_loc::current())
{ {
log(loc, level::info, msg); log(loc, level::info, msg);
} }
template<typename S, typename = is_convertible_to_sv<S>> void warn(string_view_t msg, source_loc loc = source_loc::current())
void warn(const S msg, source_loc loc = source_loc::current())
{ {
log(loc, level::warn, msg); log(loc, level::warn, msg);
} }
template<typename S, typename = is_convertible_to_sv<S>> void error(string_view_t msg, source_loc loc = source_loc::current())
void error(const S msg, source_loc loc = source_loc::current())
{ {
log(loc, level::err, msg); log(loc, level::err, msg);
} }
template<typename S, typename = is_convertible_to_sv<S>> void critical(string_view_t msg, source_loc loc = source_loc::current())
void critical(const S msg, source_loc loc = source_loc::current())
{ {
log(loc, level::critical, msg); log(loc, level::critical, msg);
} }