home | help
std::experi...::nullopt_t(3)   C++ Standard Libary  std::experi...::nullopt_t(3)

NAME
     std::experimental::nullopt_t - std::experimental::nullopt_t

Synopsis
	Defined in header <experimental/optional>
	struct nullopt_t;			   (library fundamentals TS)

	std::experimental::nullopt_t is an empty class type used to indicate op-
     tional type
	with uninitialized state. In particular, std::experimental::optional has
     a
	constructor  with  nullopt_t  as a single argument, which creates an op-
     tional that does
	not contain a value.

	std::experimental::nullopt_t must be a LiteralType and cannot have a de-
     fault
	constructor.

	It must have a constexpr constructor that takes some  implementation-de-
     fined literal
	type.

Notes
	nullopt_t  is not DefaultConstructible to support both op = {}; and op =
     nullopt; as
	the syntax for disengaging an optional object.

	A possible implementation of this class is

      struct nullopt_t
      {
	  constexpr nullopt_t(int) {}
      };

See also
	nullopt an object of type nullopt_t
	(C++17) (constant)

Category:
	  * Noindexed pages

http://cppreference.com 	   2024.06.10	    std::experi...::nullopt_t(3)

home | help