Boost 1.86.0 includes a significant rewrite of the UUID library. The
Changelog[^1] notes that:
> u.data(), where u is of type uuid, now returns a pointer to the first
> uint8_t of the representation (same as u.begin().) For backward
> compatibility, data is a function object with operator(), rather than
> a member function, which allows most existing uses of data as a
> public member to remain valid, if no longer encouraged.
I don't know enough about C++ to judge how that should have worked, but
it leads to a compile error here. This patch uses BOOST_VERSION to
decide whether to access .data as a member or .data() as a function.
[^1]: https://www.boost.org/doc/libs/1_86_0/libs/uuid/doc/html/uuid.html#changes
Signed-off-by: Luc Ritchie <luc.ritchie@gmail.com>
}
const char *bytes() const {
+#if BOOST_VERSION >= 108600
+ return (const char*)uuid.data();
+#else
return (const char*)uuid.data;
+#endif
}
void encode(::ceph::buffer::list::contiguous_appender& p) const {