Initial Win32 support.

This library now compiles on Windows but requires VS2015 for Windows.
VS2013 may work but this has not been tested yet.
Requires NOMINMAX to be defined to avoid clashes with the Windows.h
headers and the C++ stl and this libraries Date max functions.
Also known to work equivalently with recent g++ and mingw combinations
but -std=C++14 flag should be set.
C++14 restrictions may be relaxed later. Patches welcome!
g++ 5.1 was tested. It may work with other version but that hasn't been tried.
Mac OS and Linux systems are known to compile with -std=c++11
current_timezone and locate_zone will return iana names not windows
time zone names. This is expected and as designed.
This commit is contained in:
gm
2015-08-06 23:16:03 -04:00
committed by Howard Hinnant
parent 225a2b6c65
commit c21e392c81
4 changed files with 982 additions and 6 deletions
+8 -1
View File
@@ -22,7 +22,14 @@ namespace date
// Configuration |
//---------------+
#if __cplusplus >= 201402
// MSVC's constexpr support is still a WIP, even in VS2015.
// Fall back to a lesser mode to support it.
// TODO: Remove this or retest later once MSVC's constexpr improves.
#if defined(_MSC_VER) && ! defined(__clang__) && ! defined( __GNUG__)
# define CONSTDATA const
# define CONSTCD11
# define CONSTCD14
#elif __cplusplus >= 201402
# define CONSTDATA constexpr
# define CONSTCD11 constexpr
# define CONSTCD14 constexpr