Quick correction to get_cout

This commit is contained in:
Jeremy Rifkin 2024-10-06 14:06:52 -05:00
parent 4c59e73a01
commit 757c0f87fe
No known key found for this signature in database
GPG Key ID: 19AA8270105E8EB4
2 changed files with 5 additions and 3 deletions

View File

@ -3,6 +3,7 @@
#include <iostream>
namespace cpptrace {
namespace microfmt {
namespace detail {
std::ostream& get_cout() {
@ -11,3 +12,4 @@ namespace detail {
}
}
}

View File

@ -262,6 +262,8 @@ namespace microfmt {
}
return str;
}
std::ostream& get_cout();
}
#if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L)
@ -285,11 +287,9 @@ namespace microfmt {
return detail::format<1>(fmt, fmt + std::strlen(fmt), {detail::format_value(1)});
}
std::ostream& get_cout();
template<typename S, typename... Args>
void print(const S& fmt, Args&&... args) {
get_cout()<<format(fmt, args...);
detail::get_cout()<<format(fmt, args...);
}
template<typename S, typename... Args>