gul-cpp / gul14

General Utility Library for C++14
https://gul14.info/
GNU Lesser General Public License v2.1
2 stars 1 forks source link

Add date header #9

Closed alt-graph closed 2 years ago

alt-graph commented 2 years ago

This PR adds Howard Hinnant's date.h header as proposed in #7. I have made the "usual" modifications for GUL14: The header is enclosed in namespace gul14::date:: and it uses gul14::string_view instead of std::string_view. I also added the necessary pieces of documentation and copyright notices and tentatively increased our version number to 2.7.

alt-graph commented 2 years ago

One point we should discuss before merging: The header is fairly big and full of template definitions. I assume it will be somewhat costly in terms of compile time. Therefore, should we include <gul14/date.h> by default with <gul14/gul.h>? This PR currently does so, but personally I tend towards no.

Finii commented 2 years ago

but personally I tend towards no.

I would also not include it.

Finii commented 2 years ago

I usually first add the unmodified file as one commit and then add our specific changes as separate commit; then one can see what has been customized. Also helpful if the upstream source is updated and one wants to follow that, often the same diff can be used easily.

Did not see anything to complain about apart from the install.

Edit: DOH!

alt-graph commented 2 years ago

Seems that the date header is not installed?

Ouch, thanks! Done. :)

alt-graph commented 2 years ago

Fixed the missing header installation. I also added a bit of Doxygen documentation on how to include GUL14's headers.