mirror of
https://github.com/ToruNiina/toml11.git
synced 2025-09-17 17:21:43 +08:00
feat: workaround __cplusplus problem on MSVC
This commit is contained in:
@@ -7,8 +7,9 @@
|
||||
#include <utility>
|
||||
|
||||
#include "traits.hpp"
|
||||
#include "version.hpp"
|
||||
|
||||
#if __cplusplus >= 201402L
|
||||
#if TOML11_CPLUSPLUS_STANDARD_VERSION >= 201402L
|
||||
# define TOML11_MARK_AS_DEPRECATED(msg) [[deprecated(msg)]]
|
||||
#elif defined(__GNUC__)
|
||||
# define TOML11_MARK_AS_DEPRECATED(msg) __attribute__((deprecated(msg)))
|
||||
@@ -21,7 +22,7 @@
|
||||
namespace toml
|
||||
{
|
||||
|
||||
#if __cplusplus >= 201402L
|
||||
#if TOML11_CPLUSPLUS_STANDARD_VERSION >= 201402L
|
||||
|
||||
using std::make_unique;
|
||||
|
||||
@@ -33,7 +34,7 @@ inline std::unique_ptr<T> make_unique(Ts&& ... args)
|
||||
return std::unique_ptr<T>(new T(std::forward<Ts>(args)...));
|
||||
}
|
||||
|
||||
#endif // __cplusplus >= 2014
|
||||
#endif // TOML11_CPLUSPLUS_STANDARD_VERSION >= 2014
|
||||
|
||||
namespace detail
|
||||
{
|
||||
@@ -91,7 +92,7 @@ T from_string(const std::string& str, T opt)
|
||||
|
||||
namespace detail
|
||||
{
|
||||
#if __cplusplus >= 201402L
|
||||
#if TOML11_CPLUSPLUS_STANDARD_VERSION >= 201402L
|
||||
template<typename T>
|
||||
decltype(auto) last_one(T&& tail) noexcept
|
||||
{
|
||||
|
Reference in New Issue
Block a user