15 #ifndef SPATIAL_COMPRESS_HPP
16 #define SPATIAL_COMPRESS_HPP
45 template<
typename Base,
typename Member>
55 : Base(compressed_base),
_member() { }
60 Compress(
const Base& compressed_base,
const Member& member)
61 : Base(compressed_base),
_member(member) { }
69 {
return *
static_cast<const Base*
>(
this); }
73 {
return *
static_cast<Base*
>(
this); }
96 #endif // SPATIAL_COMPRESS_HPP
const Member & operator()() const
Quick accessor to the member.
Member & operator()()
Quick accessor to the member.
Member _member
Storage for the member value.
Base & base()
Accessor to the base class.
Uses the empty base class optimization in order to compress a potentially empty base class with a mem...
The main namespace used in the library.
const Base & base() const
Accessor to the base class.
Compress(const Base &compressed_base)
Compressed member with uninitialized base.
Compress()
Uninitialized compressed base.
Compress(const Base &compressed_base, const Member &member)
Standard initializer with Base and Member values.