mirror of
https://github.com/HowardHinnant/date.git
synced 2024-12-27 00:14:07 +08:00
Enable CONSTCD14 for VS2017
This commit is contained in:
parent
49a59e5665
commit
186dbb2891
25
date.h
25
date.h
@ -57,15 +57,22 @@ namespace date
|
|||||||
// Configuration |
|
// Configuration |
|
||||||
//---------------+
|
//---------------+
|
||||||
|
|
||||||
// MSVC's constexpr support is still a WIP, even in VS2015.
|
#if defined(_MSC_VER) && !defined(__clang__)
|
||||||
// Fall back to a lesser mode to support it.
|
// MSVC
|
||||||
// TODO: Remove this or retest later once MSVC's constexpr improves.
|
# if _MSC_VER < 1910
|
||||||
#if defined(_MSC_VER) && _MSC_VER <= 1900 && ! defined(__clang__)
|
// before VS2017
|
||||||
// MS cl compiler pre VS2017
|
# define CONSTDATA const
|
||||||
# define CONSTDATA const
|
# define CONSTCD11
|
||||||
# define CONSTCD11
|
# define CONSTCD14
|
||||||
# define CONSTCD14
|
# define NOEXCEPT _NOEXCEPT
|
||||||
# define NOEXCEPT _NOEXCEPT
|
# else
|
||||||
|
// VS2017 and later
|
||||||
|
# define CONSTDATA constexpr const
|
||||||
|
# define CONSTCD11 constexpr
|
||||||
|
# define CONSTCD14 constexpr
|
||||||
|
# define NOEXCEPT noexcept
|
||||||
|
# endif
|
||||||
|
|
||||||
#elif __cplusplus >= 201402
|
#elif __cplusplus >= 201402
|
||||||
// C++14
|
// C++14
|
||||||
# define CONSTDATA constexpr const
|
# define CONSTDATA constexpr const
|
||||||
|
Loading…
x
Reference in New Issue
Block a user