Open tobias-loew opened 1 month ago
Indeed, thanks for the report. I'll see if I can fix this between the beta and the release, as it's not as easy as just adding a constexpr
to the constructor because std::memcpy
isn't always constexpr
.
Another minor regression: before .data
returned a reference to the array. Migration would be easier having a data()
method returning a reference or a std::span
to the byte representation.
For a contiguous container, data()
by convention returns a pointer to the first element. It's in principle possible to return a reference to the array which will decay to a pointer but that's a bit too inventive.
Although maybe if the constructor is constexpr, data() should be, too.
It's also no longer trivial: https://godbolt.org/z/sb8K6YTz7 Probably because of this line: https://github.com/boostorg/uuid/blob/c432e16a4c6b477a1f1e0bbdc6de806237b0c4f0/include/boost/uuid/uuid.hpp#L96
It's still trivially copyable and standard layout, but no longer trivial (because the default constructor doesn't leave it uninitialized) or POD.
Before version 1.85 uuid was an aggreagate and could be constexpr constructed from a sequence of bytes. With version 1.85 this is no longer possible. (I've got user-defined literal which converts uuid string-representation at compile-time into uuids that no longer works with 1.85.)