std::experi...erased_type(3)

πŸ“¦ version 2024.07.05, in nixpkgs unstable, opensuse-leap 16.0

std::experi...erased_type(3) πŸ’…

okay bestie, this is the std::experi...erased_type(3) page from the C++ Standard Libary manual. It’s short, it’s iconic, and it’s literally all about an empty struct doing placeholder main-character work. ✨

NAME πŸŽ€

std::experimental::erased_type - std::experimental::erased_type

no cap, the NAME section is just the name twice. πŸ’–

Synopsis 🌸

Defined in header <experimental/utility>

struct erased_type { };                   (library fundamentals TS)
                                          (removed in library fundamentals TS v3)

The class erased_type is an empty struct that serves as a placeholder for a type in situations where the actual type is determined at runtime. For example, in classes that use type-erased allocators, the nested typedef allocator_type is an alias for erased_type. slay. 🫢

Notes πŸ¦‹

erased_type is removed in LFTS v3 because std::pmr::polymorphic_allocator<> is preferable for type erasure. that’s the tea. πŸ“


source: http://cppreference.com Β· version/date: 2024.06.10 Β· page: std::experi...erased_type(3) β€” bye bestie, go forth and type-erase with taste πŸ’œπŸŒˆ

πŸ“¦ where this page comes from