STD::__IS_LOCATION_INVARIANT(3cxx)
π NAME π
std::__is_location_invariant< _Tp > β bestie, this is the trait that clocks whether a type is "location-invariant" πβ¨
π¦ SYNOPSIS π¦
#include <functional>
Inherits is_trivially_copyable::type. No cap, that's literally the parent π
πΈ Detailed Description πΈ
template<typename _Tp>
struct std::__is_location_invariant< _Tp >
Okay so here's the tea β β this trait is the one that says "this type is location-invariant", which means the address of the object (or the address of any of its members, fr fr) will not escape π like it's not gonna leak out into the wild and get remembered somewhere.
Trivially copyable types are location-invariant, periodt π so that part's handled for you. And users can specialize this trait for other types β yes, you, you can do that π«Ά go off, main character energy β¨
Lowkey important vibe check: if the address does escape, the type is not location-invariant and this trait should say no. Don't lie to the compiler, bestie π
π Author π
Generated automatically by Doxygen for libstdc++ from the source code. Not me, not you, not a human β literally Doxygen doing its thing π€π
and that's the whole page, gorgeous π this icon was brought to you by libstdc++, straight from the source code, generated by Doxygen, and the footer energy is 100% std::__is_loca...nvariant< _Tp >(3cxx) β iykyk ππ
π¦ where this page comes from
- ubuntu noble: libstdc++-14-doc 14-20240412-0ubuntu1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms