mirror of
https://github.com/monero-project/monero.git
synced 2025-05-17 21:30:25 -04:00
build: fix build with Boost 1.85 and remove instances of viewkey logging
1. Use `std::is_standard_layout` and `std::is_trivially_copyable` instead of `std::is_pod` for KV byte-wise serialization, which fixes compile issue for Boost UUIDs 2. Use `std::has_unique_object_representations` instead of `alignof(T) == 1` for epee byte spans and epee hex functions 3. Removed reimplementation of `std::hash` for `boost::uuids::uuid 4. Removed `<<` operator overload for `crypto::secret_key` 5. Removed instances in code where private view key was dumped to the log in plaintext
This commit is contained in:
parent
a1dc85c537
commit
ed955bf751
20 changed files with 65 additions and 60 deletions
|
@ -89,6 +89,7 @@ namespace string_tools
|
|||
std::string pod_to_hex(const t_pod_type& s)
|
||||
{
|
||||
static_assert(std::is_standard_layout<t_pod_type>(), "expected standard layout type");
|
||||
static_assert(std::has_unique_object_representations_v<t_pod_type>, "type may have padding");
|
||||
return to_hex::string(as_byte_span(s));
|
||||
}
|
||||
//----------------------------------------------------------------------------
|
||||
|
@ -96,6 +97,7 @@ namespace string_tools
|
|||
bool hex_to_pod(const boost::string_ref hex_str, t_pod_type& s)
|
||||
{
|
||||
static_assert(std::is_standard_layout<t_pod_type>(), "expected standard layout type");
|
||||
static_assert(std::has_unique_object_representations_v<t_pod_type>, "type may have padding");
|
||||
return from_hex::to_buffer(as_mut_byte_span(s), hex_str);
|
||||
}
|
||||
//----------------------------------------------------------------------------
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue