Quick correction to get_cout
This commit is contained in:
parent
4c59e73a01
commit
757c0f87fe
@ -3,6 +3,7 @@
|
|||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
namespace cpptrace {
|
namespace cpptrace {
|
||||||
|
namespace microfmt {
|
||||||
namespace detail {
|
namespace detail {
|
||||||
|
|
||||||
std::ostream& get_cout() {
|
std::ostream& get_cout() {
|
||||||
@ -11,3 +12,4 @@ namespace detail {
|
|||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|||||||
@ -262,6 +262,8 @@ namespace microfmt {
|
|||||||
}
|
}
|
||||||
return str;
|
return str;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::ostream& get_cout();
|
||||||
}
|
}
|
||||||
|
|
||||||
#if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L)
|
#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)});
|
return detail::format<1>(fmt, fmt + std::strlen(fmt), {detail::format_value(1)});
|
||||||
}
|
}
|
||||||
|
|
||||||
std::ostream& get_cout();
|
|
||||||
|
|
||||||
template<typename S, typename... Args>
|
template<typename S, typename... Args>
|
||||||
void print(const S& fmt, Args&&... args) {
|
void print(const S& fmt, Args&&... args) {
|
||||||
get_cout()<<format(fmt, args...);
|
detail::get_cout()<<format(fmt, args...);
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename S, typename... Args>
|
template<typename S, typename... Args>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user