mirror of
https://github.com/gabime/spdlog.git
synced 2025-01-31 09:39:15 +08:00
7cdd65075c
The meaning of using quotes to #include is implementation defined, so it may or not may be what we want. At least POSIX (https://pubs.opengroup.org/onlinepubs/9699919799/utilities/c99.html) says: "headers whose names are enclosed in double-quotes ( "" ) shall be searched for first in the directory of the file with the #include line", so not what we want since "spdlog" ends up twice in the path.
33 lines
609 B
C++
33 lines
609 B
C++
// Copyright(c) 2015-present, Gabi Melman & spdlog contributors.
|
|
// Distributed under the MIT License (http://opensource.org/licenses/MIT)
|
|
|
|
#pragma once
|
|
|
|
#include <spdlog/details/null_mutex.h>
|
|
#include <mutex>
|
|
|
|
namespace spdlog {
|
|
namespace details {
|
|
|
|
struct console_mutex
|
|
{
|
|
using mutex_t = std::mutex;
|
|
static mutex_t &mutex()
|
|
{
|
|
static mutex_t s_mutex;
|
|
return s_mutex;
|
|
}
|
|
};
|
|
|
|
struct console_nullmutex
|
|
{
|
|
using mutex_t = null_mutex;
|
|
static mutex_t &mutex()
|
|
{
|
|
static mutex_t s_mutex;
|
|
return s_mutex;
|
|
}
|
|
};
|
|
} // namespace details
|
|
} // namespace spdlog
|