Added support for SPDLOG_NO_ATOMIC_LEVELS in tweakme.h

This commit is contained in:
gabime
2016-04-10 01:37:11 +03:00
parent d0120b48c5
commit 974379c9be
6 changed files with 39 additions and 10 deletions

View File

@@ -5,17 +5,20 @@
#pragma once
#include <string>
#include <initializer_list>
#include <chrono>
#include <memory>
#include <atomic>
#include <exception>
#if defined(_WIN32) && defined(SPDLOG_WCHAR_FILENAMES)
#include <codecvt>
#include <locale>
#endif
#include <spdlog/details/null_mutex.h>
//visual studio does not support noexcept yet
#ifndef _MSC_VER
#define SPDLOG_NOEXCEPT noexcept
@@ -23,7 +26,6 @@
#define SPDLOG_NOEXCEPT throw()
#endif
namespace spdlog
{
@@ -39,7 +41,11 @@ using log_clock = std::chrono::system_clock;
using sink_ptr = std::shared_ptr < sinks::sink >;
using sinks_init_list = std::initializer_list < sink_ptr >;
using formatter_ptr = std::shared_ptr<spdlog::formatter>;
#if defined(SPDLOG_NO_ATOMIC_LEVELS)
using atomic_level = details::null_atomic_int;
#else
using atomic_level = std::atomic_int;
#endif
//Log level enum
namespace level