std::experi...Destructible(3)

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

πŸ’… NAME πŸ’…

std::experimental::ranges::Destructible β€” std::experimental::ranges::Destructible

Okay bestie, real talk: same name on both sides of the dash, and we're keeping it. This is the C++ Standard Libary page for the Destructible concept, man page section 3, and the vibe is very "niche C++ template lore but make it cute." πŸŽ€


πŸ¦‹ Synopsis πŸ¦‹

Defined in header <experimental/ranges/concepts>

template< class T >
(ranges TS)
concept bool Destructible = std::is_nothrow_destructible<T>::value;

The concept Destructible covers all types whose instances can safely be destroyed at the end of their lifetime (including reference types). Reference types included, periodt. πŸ’–

There need not be any subsumption relationship between Destructible<T> and std::is_nothrow_destructible<T>::value. That's it β€” no extra subsumption lore, no cap. πŸ’€


πŸ’‘ Notes πŸ’‘

Unlike the Destructible named requirement in the main C++ standard, Destructible requires the destructor to be noexcept(true), not merely non-throwing when invoked, and allows reference types and array types. This is the glow-up difference, bestie. ✨


πŸ‘€ See also πŸ‘€

The original see-also column is a little feral, so here's the whole squad, no details left behind 🫢:

  • is_destructible
  • is_trivially_destructible
  • is_nothrow_destructible
  • the text checks if a type has a non-deleted destructor
  • (C++11)
  • (class template)
  • (C++11)
  • (C++11)

Yes, those markers are doing their own thing. We respect the chaos. 🌈


Source check 🫢: this page comes from http://cppreference.com, dated 2024.06.10, with the footer tag std::experi...Destructible(3). Bye bestie, go destroy safely πŸ’…βœ¨

πŸ“¦ where this page comes from