mirror of
https://github.com/gabime/spdlog.git
synced 2024-12-26 10:31:34 +08:00
fixed noexcept in visual studio
This commit is contained in:
parent
3014087b66
commit
1e7814295b
@ -27,12 +27,21 @@
|
|||||||
#include<initializer_list>
|
#include<initializer_list>
|
||||||
#include<chrono>
|
#include<chrono>
|
||||||
|
|
||||||
|
//visual studio does not support noexcept yet
|
||||||
|
#ifndef _MSC_VER
|
||||||
|
#define SPDLOG_NOEXCEPT noexcept
|
||||||
|
#else
|
||||||
|
#define SPDLOG_NOEXCEPT
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace spdlog
|
namespace spdlog
|
||||||
{
|
{
|
||||||
|
|
||||||
class formatter;
|
class formatter;
|
||||||
|
|
||||||
namespace sinks { class sink;}
|
namespace sinks {
|
||||||
|
class sink;
|
||||||
|
}
|
||||||
|
|
||||||
// Common types across the lib
|
// Common types across the lib
|
||||||
using log_clock = std::chrono::system_clock;
|
using log_clock = std::chrono::system_clock;
|
||||||
@ -72,7 +81,7 @@ class spdlog_ex : public std::exception
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
spdlog_ex(const std::string& msg) :_msg(msg) {}
|
spdlog_ex(const std::string& msg) :_msg(msg) {}
|
||||||
const char* what() const noexcept override
|
const char* what() const SPDLOG_NOEXCEPT override
|
||||||
{
|
{
|
||||||
return _msg.c_str();
|
return _msg.c_str();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user