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