std::experimental::void_t(3)

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

πŸ’– NAME πŸ’–

okay so bestie, welcome to std::experimental::void_t(3) in the C++ Standard Libary manual (yes, Libary, iconic typo energy, we move). this page is literally about std::experimental::void_t β€” that's the name, that's the vibe, no cap.

✨ Synopsis ✨

so here's the setup: it's defined in header <experimental/type_traits>, and the synopsis is giving very much template metaprogramming main character energy:

template< class... >                          (library fundamentals TS v2)
using void_t = void;

it's a utility metafunction that maps a sequence of any types to the type void. that's the whole flex. πŸ’…

πŸ“ Notes πŸ“

this utility metafunction is used in template metaprogramming to detect ill-formed types in SFINAE context. yes bestie, SFINAE, we're in the template trenches now 😭

first voted into C++17 as std::void_t, it was later added as well to the library fundamentals TS as std::experimental::void_t, because it is a dependency of the detection idiom and the LFTS v2 is based on C++14. periodt. 🫢

πŸ‘€ See also πŸ‘€

  • void_t β€” void variadic alias template (C++17) (alias template) ✨

mwah πŸ’– that's the whole page, bestie! this gem came from http://cppreference.com, dated 2024.06.10, and the footer says std::experimental::void_t(3) β€” now go slay some templates πŸŒˆπŸ‘‘

πŸ“¦ where this page comes from