std::constructible_from(3)

πŸ“¦
version 2024.07.05 Β· 3 versions
, in nixpkgs unstable, opensuse-leap 16.0

std::constructible_from(3) πŸ’…βœ¨

okay bestie, we are in the C++ Standard Libary and this page is about std::constructible_from, a concept that is lowkey doing the most important vibe check on types. It's giving main character energy: β€œcan I build a T out of these Args...?” πŸ”₯

πŸŽ€ NAME πŸŽ€

std::constructible_from - std::constructible_from

✨ Synopsis ✨

This cutie is defined in header <concepts>, and here’s the exact synopsis with zero edits, bestie:

          Defined in header <concepts>
          template< class T, class... Args >

          concept constructible_from =
       (since C++20)

              std::destructible<T> && std::is_constructible_v<T, Args...>;

The constructible_from concept specifies that a variable of type T can be initialized with the given set of argument types Args.... That’s the whole assignment, and it ate. πŸ’–

πŸ‘€ See also πŸ‘€

  • is_constructible
  • is_trivially_constructible
  • is_nothrow_constructible β€” checks if a type has a constructor for specific arguments
  • (C++11) (class template)
  • (C++11)
  • (C++11)

Those are the related entries, with every (C++11) and the (class template) marker kept safe and sound. 🫢


mwah πŸ’‹ source/version/date check: http://cppreference.com, 2024.06.10, manual page std::constructible_from(3) β€” periodt. 🌈

πŸ“¦ where this page comes from