I'm thinking about using current timestamp as a piece of version. I would like to retrieve that information at compile time. So ideally I would like to do:
constexpr long long currentTimestamp = getCurrentTimestamp();
Is that possible with C++14?
Use standard C __TIME__
macro with __DATE__
macro.
See this question for an example.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With