Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This constexpr-ifies just enough things to allow for a constexpr
Guid(std::string_view)
constructor. Now you can write readable GUIDs at compile time:After that, there was barely any code left in the guid.cpp file. I moved the remaining short functions into the header file too. Only
newGuid()
requires that users add the guid.cpp file to their compilation, to avoid pulling things like the windows.h header or a libuuid dependency in the header file. This is kinda just a thing I like but not necessary by any stretch so if you don't prefer it I'm happy to revert that.Some of the constexpr methods have manually written loops instead of non-constexpr
std::fill
and stuff.isValid()
andzeroify()
are both required by theGuid(std::string_view)
constructor so I had to make do to make that constexpr :)Also updated CI to work again. The
MATRIX_EVAL
stuff appears to be broken despite Travis recommending it in their docs? Weird. Removed the Homebrew update that was taking ages, Travis must've updated the CMake version on their OSX image at some point because it's now recent enough.