My Project
Classes | Static Public Attributes | List of all members
bsl::aligned_union< GUARD, LEN, TYPES > Class Template Referencefinal

Implements the std::aligned_union interface. The only real difference is we use "m_data" instead of "data" to represent the member variable name. More...

#include <aligned_union.hpp>

Classes

class  type
 Implements the std::aligned_union type interface. More...
 

Static Public Attributes

static constexpr bsl::uintmax alignment_value {index_sequence<alignof(TYPES)...>::max()}
 the alignment of the union.
 

Detailed Description

template<typename GUARD, bsl::uintmax LEN, typename... TYPES>
class bsl::aligned_union< GUARD, LEN, TYPES >

Implements the std::aligned_union interface. The only real difference is we use "m_data" instead of "data" to represent the member variable name.

#include <bsl/debug.hpp>
namespace bsl
{
inline void
example_aligned_union_overview() noexcept
{
if (sizeof(union_type) >= sizeof(bsl::int64)) {
bsl::print() << "success\n";
}
}
}
Template Parameters
GUARDused to prevent you from creating an aligned_union and not an aligned_union_t
LENthe size of the storage buffer in bytes
TYPESthe types that make up the union

The documentation for this class was generated from the following file: