std::nullopt_t(3cxx)

πŸ’– NAME πŸ’–

std::nullopt_t β€” the tag type that goes "nope, we're done here" and disengages your optional objects πŸŽ€

This page lives in section 3cxx of the manual, bestie.


✨ SYNOPSIS ✨

#include <optional>

🌸 Public Types 🌸

enum class _Construct { _Token }

πŸ¦‹ Public Member Functions πŸ¦‹

constexpr nullopt_t(_Construct) noexcept

πŸ‘‘ Detailed Description πŸ‘‘

std::nullopt_t β€” tag type to disengage optional objects. That's literally its whole job and it ate πŸ’…


πŸ’œ Author πŸ’œ

Generated automatically by Doxygen for libstdc++ from the source code. Not a human, just a very diligent little robot 🧚


ok so real talk β€” this one's short but it's iconic. std::nullopt_t is the type of std::nullopt, the thing you drop into an std::optional when you want it empty. No cap. ✨

This page came to you courtesy of libstdc++ (that's the footer energy, babe), and it's filed right here under std::nullopt_t(3cxx). Stay slay, take care of your optionals, and remember: disengaging is self-care πŸ«ΆπŸ’–πŸŒˆ