tetl 0.1.0
Embedded Template Library
Loading...
Searching...
No Matches
has_unique_object_representations< T > Struct Template Reference

If T is TriviallyCopyable and if any two objects of type T with the same value have the same object representation, provides the member constant value equal true. For any other type, value is false. More...

#include <has_unique_object_representations.hpp>

Inheritance diagram for has_unique_object_representations< T >:
integral_constant< bool, B >

Additional Inherited Members

- Public Types inherited from integral_constant< bool, B >
using type
 
using type
 
using value_type
 
using value_type
 
- Public Member Functions inherited from integral_constant< bool, B >
constexpr operator value_type () const noexcept
 
constexpr operator value_type () const noexcept
 
constexpr auto operator() () const noexcept -> value_type
 
constexpr auto operator() () const noexcept -> value_type
 
- Static Public Attributes inherited from integral_constant< bool, B >
static constexpr bool value
 
static constexpr bool value
 

Detailed Description

template<typename T>
struct etl::has_unique_object_representations< T >

If T is TriviallyCopyable and if any two objects of type T with the same value have the same object representation, provides the member constant value equal true. For any other type, value is false.

For the purpose of this trait, two arrays have the same value if their elements have the same values, two non-union classes have the same value if their direct subobjects have the same value, and two unions have the same value if they have the same active member and the value of that member is the same. It is implementation-defined which scalar types satisfy this trait, but unsigned (until C++20) integer types that do not use padding bits are guaranteed to have unique object representations. The behavior is undefined if T is an incomplete type other than (possibly cv-qualified) void or array of unknown bound. The behavior of a program that adds specializations for has_unique_object_representations or has_unique_object_representations_v is undefined.


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