oxen-core/contrib/epee
Jason Rhinelander d66e6e9e3f Align hashable data structures
We don't impose any alignment on hashable types, but this means the
hashing function is doing invalid misaligned access when converting to a
size_t.  This aligns all of the primitive data types (crypto::hash,
public keys, etc.) to the same alignment as size_t.

That cascades into a few places in epee which only allow byte spanning
types that have byte alignment when what it really requires is just that
the type has no padding.  In C++17 this is exactly the purpose of
std::has_unique_object_representations, but that isn't available (or
even implementable) in C++14 so add specializations for the type that
need it to tell epee that we know those types are properly packed and
that it can safely use them as bytes.

Related to this, monero/epee also misuses `is_standard_layout` when the
purpose is actually `is_trivially_copyable`, so fixed that too.  (You
need the latter but don't need the former for a type to be safely
memcpy'able; the only purpose of `is_standard_layout` is when you need
to be sure your structs are compatible with C structs which is
irrelevant here).
2019-11-27 14:07:52 -04:00
..
demo default initialize rpc structures 2019-03-04 22:38:03 +00:00
include Align hashable data structures 2019-11-27 14:07:52 -04:00
src iOS build fix (#903) 2019-10-18 08:48:18 +10:00
tests Remove boost::value_initialized and BOOST_FOREACH (#921) 2019-11-01 09:26:58 +11:00
CMakeLists.txt Update 2019 copyright 2019-03-05 22:05:34 +01:00
LICENSE.txt year updated in license 2015-01-02 18:52:46 +02:00
README.md year updated in license 2015-01-02 18:52:46 +02:00

epee - is a small library of helpers, wrappers, tools and and so on, used to make my life easier.