mirror of
https://github.com/HowardHinnant/date.git
synced 2024-12-28 01:04:54 +08:00
Fix a WIN32 -> _WIN32 typo and try to make some comments more readable.
This commit is contained in:
parent
c8ee261043
commit
0791828329
28
tz.cpp
28
tz.cpp
@ -35,28 +35,30 @@
|
|||||||
#include <tuple>
|
#include <tuple>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#ifdef WIN32
|
#ifdef _WIN32
|
||||||
#include <locale>
|
#include <locale>
|
||||||
#include <codecvt>
|
#include <codecvt>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if TIMEZONE_MAPPING
|
#if TIMEZONE_MAPPING
|
||||||
// Timezone mapping is mapping native timezone names to "Standard" ones.
|
// Timezone mapping maps native (e.g. Windows) timezone names to the "Standard" names
|
||||||
// Mapping reades a CSV file for the data and currently uses
|
// used by this library.
|
||||||
// std::quoted to do that which is a C++14 feature found in iomanip.
|
// The mapping process parses a CSV file of mapping data and uses std::quoted to do that.
|
||||||
// VS2015 supports std::quoted but MSVC has a mixed rather
|
// Because std::quoted is a C++14 feature found in <iomanip> any platforms using
|
||||||
// than strict standard support so there is no -std=c++14 flag for MSVC.
|
// the mapping process require C++14.
|
||||||
// MingW is a Windows based platform so requires mapping and thefore C++14.
|
// Windows uses the mapping process so C++14 is required on Windows.
|
||||||
// Linux/Mac currently do not require mapping so C++14 isn't needed for this
|
// VS2015 supports std::quoted but there is no -std=c++14 flag required to enable it.
|
||||||
// so C++11 should work.
|
// MinGW on Windows also requires the mapping process so -std=c++14 is required
|
||||||
|
// when using g++ or clang.
|
||||||
|
// On Linux/Mac, no mapping / CSV file is required so std::quoted and C++14 isn't needed
|
||||||
|
// and so on these platforms C++11 should work but C++14 is preferred even there too
|
||||||
|
// because the date library in general works better with C++14.
|
||||||
#include <iomanip>
|
#include <iomanip>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// unistd.h is used on some platforms as part of the the means to get
|
// unistd.h is used on some platforms as part of the the means to get
|
||||||
// the current time zone. However unistd.h only somtimes exists on Win32.
|
// the current time zone. On Win32 Windows.h provides a means to do it.
|
||||||
// gcc/mingw support unistd.h on Win32 but MSVC does not.
|
// gcc/mingw supports unistd.h on Win32 but MSVC does not.
|
||||||
// However on Win32 we don't need unistd.h anyway to get the current timezone
|
|
||||||
// as Windows.h provides a means to do it
|
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
#include <Windows.h>
|
#include <Windows.h>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user