indentlog: compile fixes for OSX build (clang 11)
This commit is contained in:
parent
f88484a79d
commit
e149d44a93
3 changed files with 33 additions and 22 deletions
|
|
@ -232,7 +232,7 @@ namespace xo {
|
|||
} /*nesting_level*/
|
||||
|
||||
template <typename CharT, typename Traits>
|
||||
basic_scope<CharT, Traits>::state_impl_type *
|
||||
typename basic_scope<CharT, Traits>::state_impl_type *
|
||||
basic_scope<CharT, Traits>::require_indent_thread_local_state()
|
||||
{
|
||||
state_impl_type * local_state = require_thread_local_state();
|
||||
|
|
@ -244,7 +244,7 @@ namespace xo {
|
|||
} /*require_thread_local_stream*/
|
||||
|
||||
template <typename CharT, typename Traits>
|
||||
basic_scope<CharT, Traits>::state_impl_type *
|
||||
typename basic_scope<CharT, Traits>::state_impl_type *
|
||||
basic_scope<CharT, Traits>::require_thread_local_state()
|
||||
{
|
||||
if(!s_threadlocal_state) {
|
||||
|
|
|
|||
|
|
@ -13,10 +13,6 @@
|
|||
|
||||
namespace xo {
|
||||
namespace time {
|
||||
|
||||
using utc_nanos = std::chrono::time_point<std::chrono::system_clock,
|
||||
std::chrono::nanoseconds>;
|
||||
|
||||
using nanos = std::chrono::nanoseconds;
|
||||
using microseconds = std::chrono::microseconds;
|
||||
using milliseconds = std::chrono::milliseconds;
|
||||
|
|
@ -24,6 +20,12 @@ namespace xo {
|
|||
using hours = std::chrono::hours;
|
||||
using days = std::chrono::days;
|
||||
|
||||
using utc_nanos = std::chrono::time_point<std::chrono::system_clock,
|
||||
std::chrono::nanoseconds>;
|
||||
using utc_micros = std::chrono::time_point<std::chrono::system_clock,
|
||||
std::chrono::microseconds>;
|
||||
|
||||
|
||||
struct timeutil {
|
||||
static utc_nanos now() {
|
||||
return utc_nanos(std::chrono::system_clock::now());
|
||||
|
|
@ -168,7 +170,9 @@ namespace xo {
|
|||
|
||||
/* use yyyymmdd.hh:mm:ss.nnnnnn */
|
||||
|
||||
time_t t0_time_t = (std::chrono::system_clock::to_time_t(t0));
|
||||
time_t t0_time_t
|
||||
= (std::chrono::system_clock::to_time_t
|
||||
(std::chrono::time_point_cast<microseconds>(t0)));
|
||||
//time_t t0_time_t = (std::chrono::system_clock::to_time_t(std::chrono::time_point_cast<xo::time::microseconds>(t0)));
|
||||
|
||||
/* convert to std::tm, in UTC coords,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue