There are some breaking changes between 4.x and 5.x.
It is required to compile your project with C++20 in order to use the library. If you have an ATL or WTL project, be sure to also set "Conformance Mode" to "No (/permissive) since ATL is not prepared for C++20.
The library doesn't have a dependency on Boost anymore. If you are using Boost
in your project yourself, be sure to reference Boost directly, e.g. using
vcpkg.json file.
Also the two headers <ulib/config/BoostAsio.hpp> and
<ulib/config/BoostDateTime.hpp> were removed. Replace them with the includes
for the Boost library directly.
The CommandLine and ProgramOptions classes now take an LPCTSTR argv[]
parameter instead of _TCHAR* argv[] to be more const aware. No changes are
necessary when using these classes.
The DateTime and TimeSpan classes now are using std::chrono, and because
of that, some breaking changes were made. The two classes are (mostly) defined
in their headers and don't use a shared_ptr to hold the implementation now.
- The
DateTimeimplementation is now mostly header-only for easier inlining and has a size of 16 bytes (depending on alignment). - The
DateTimector now optionally takes astd::chrono::time_pointtime point object.
- The
TimeSpanimplementation is now header-only and has a size of 8 bytes. - The default constructed
TimeSpanobject has now zero duration, not an invalid status anymore. - As a time span now always is valid, the
TimeSpan::Status()method and the ctor withT_enStatusparameter were removed as well. If a "non-valid" time span is required, usestd::optional<TimeSpan>instead. - The
TimeSpanctor now optionally takes astd::chrono::millisecondsduration object. - The
Total*()methods likeTotalHours()returneddoublevalues but always truncated it to integer values; this is fixed. - The already deprecated
FormatISO8601()method was removed. UseFormat(T_enTimeSpanFormat::formatISO8601)instead. - The method
Format(LPCTSTR)was removed as well. Use theTimeSpancomponents (likeHours(), etc.) directly to use a custom format.