STD::HAS_UNIQUE_OBJECT_REPRESENTATIONS(3cxx)
πΈ NAME πΈ
std::has_unique_object_representations< _Tp > β bestie, it's has_unique_object_representations, and it's exactly what it says on the tin π
This lil guy lives in the 3cxx manual (that's the C++ library section of the man pages, iykyk) and it's the trait that tells you whether two objects that are bit-identical are also value-identical. Periodt. β¨
π¦ SYNOPSIS π¦
#include <type_traits>
It Inherits std::integral_constant< bool, __v >. So like, it's not doing anything wild, it's just an integral_constant wearing a cute little trait outfit. π
π Public Types
typedef integral_constant< bool, __v > typeβ the base type it inherits from, the whole blueprint situation πtypedef bool value_typeβ the value type, and it's literally justbool. No cap. π
π₯ Public Member Functions
constexpr operator value_type () const noexceptβ converts intovalue_type(that'sbool, babe),constexpr, andnoexceptso it will never throw at you π«Άconstexpr value_type operator() () const noexceptβ callable! you can just do the()thing and get the value out.constexpr,noexcept, flawless π
π Static Public Attributes
static constexpr bool valueβ the actual answer, right there as a static member. This is the main character of the whole page honestly β
π Detailed Description π
template<typename _Tp>
struct std::has_unique_object_representations< _Tp >
has_unique_object_representations β that's the vibe, that's the name, that's the whole brand β¨
Since: C++17 β so if you're stuck on an older standard, sorry bestie, this one's not for you π
π§ Author π§
Generated automatically by Doxygen for libstdc++ from the source code.
Not me getting emotionally attached to a compile-time type trait... but here we are π
π That's the whole page! Signing off with all my love: this one was generated automatically by Doxygen for libstdc++, pulled straight from the source code, and it hangs out in the 3cxx manual section β no cap, that's the origin story, and I am obsessed πππ
π¦ where this page comes from
- ubuntu resolute: libstdc++-12-doc 12.5.0-9ubuntu1
- ubuntu resolute: libstdc++-13-doc 13.4.0-10ubuntu1
- ubuntu stonking: libstdc++-12-doc 12.5.0-9ubuntu1
- ubuntu stonking: libstdc++-13-doc 13.5.0-1ubuntu1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms