7 Commits

Author SHA1 Message Date
Martin Zink
8a93211679 #826 Build fix for ambiguity with >= libc++ 17 2024-05-10 16:26:43 -04:00
Lakshay Garg
018a50bcd0 Work around for a NVCC compiler bug
The NVCC compiler fails to compile the date library due
to a compiler bug which causes it to emit an error when
directly using std::ratio_{multiply,divide} in the template
instantiations for std::duration. This PR works around the
issue by introducing custom ratio_{multiply,divide} which
delegate to the standard library templates
2019-11-29 19:27:36 -05:00
Howard Hinnant
1d9e49ea21 to_stream sets failbit if unable to format
*  If a formatting flag requests data that is not available in
   the Streamable object, or if the Streamable object answers !ok(),
   failbit is set.
2018-04-06 11:19:44 -04:00
Howard Hinnant
0fb3921e5b Fail if you need a valid year and don't parse one. 2017-05-20 23:04:49 -04:00
Howard Hinnant
1e7e7a214d Simplify the implementation of format and parse:
* For format, all a type must do is implement to_stream.

* For parse, each type X must specialize parse_manip<X,CharT,Traits>.
  Each specialization must include a public typedef to itself named
  type.

* Each parse_manip specialization must have a stream extraction
  operator.

* This commit depends on expression-SFINAE.  If this commit breaks
  your build, it is likely that your compiler/version does not
  support expression-SFINAE.  To fix this NO_EXPRESSION_SFINAE
  needs to be defined in the configuration area of date.h for
  that compiler/version.
2017-02-26 14:10:10 -05:00
Howard Hinnant
a5450e9d02 Fix and test format %C 2016-11-27 13:41:24 -05:00
Howard Hinnant
2310435582 Add a format test stressing range 2016-11-26 16:15:08 -05:00