Added OnlyLValueString test case that shows the problem with
current impl. Implemented the change, that accept TimeZonePtrOrName
by forwarding reference (to preserve value category), and
merged time_zone selection into one trait.
The GCC 8 was correctly preffering the deduction guide
syntezied from the std::string_view constructor which is more
specialized than deduction guide. Changed the constructor
so the Duration cannot be deduced from it.
This is done to make the result of calling day() on
year_month_day_last object that is !ok() unspecified.
Checked only months, are there are needed to avoid UB.
Added some flexibility for usage of std::uncaught_exceptions().
Xcode 10 uses clang and perfectly compiles C++17, but
std::uncaught_exceptions() is available only on iOS 10+ devices. When
application supports iOS 9 devices and uses C++17 there is no way to
build it, except drop iOS 9 support or remove C++17 code. Using this
define we could configure should date.h use std::uncaught_exceptions()
or not.
Clang 9 (in Visual Studio) complains about a mixed signed-unsigned comparison and an unused function.
Replace the naked `int` constant -1 by `std::size_t(-1)` with the same codegen as before (no curlies to avoid narrowing).
Guard the definition of `get_download_folder()` by the same condition as its call-site.
Signed-off-by: Daniela Engert <dani@ngrt.de>
VS2019 correctly points out that a conversion from a wide NTCS to std::string requires narrowing. This may result in an undesired string value. Implement the string conversion properly.
Signed-off-by: Daniela Engert <dani@ngrt.de>
- c_encoding satisfies ctime wday encoding: days since Sunday, range
[0,6]
- iso_encoding satisfies ISO 8601 weekday:
a digit d from 1 through 7, beginning with Monday and ending with Sunday
* These flags format a duration.
* %Q specifies the duration's numeric value.
* %q specifies the duration's SI abbreviation.
* Example: format("%Q %q", 45ms) == "45 ms"
'using namespace std;' in header files can conflict with custom
namespace names. For example 'string' is used without 'std::'
qualification. If tz.h is included in a file where string is a
namespace, it cannot be compiled anymore. The same happens with date.h
if ONLY_C_LOCALE=1.