Lines Matching refs:initialized
357 constexpr bool initialized() const noexcept { return OptionalBase<T>::init_; } in initialized() function in std::experimental::optional
376 if (initialized()) dataptr()->T::~T(); in clear()
406 if (rhs.initialized()) { in optional()
415 if (rhs.initialized()) { in optional()
445 if (initialized() == true && rhs.initialized() == false) clear(); in operator =()
446 else if (initialized() == false && rhs.initialized() == true) initialize(*rhs); in operator =()
447 else if (initialized() == true && rhs.initialized() == true) contained_val() = *rhs; in operator =()
454 if (initialized() == true && rhs.initialized() == false) clear(); in operator =()
455 else if (initialized() == false && rhs.initialized() == true) initialize(std::move(*rhs)); in operator =()
456 … else if (initialized() == true && rhs.initialized() == true) contained_val() = std::move(*rhs); in operator =()
468 if (initialized()) { contained_val() = std::forward<U>(v); } in operator =()
491 …if (initialized() == true && rhs.initialized() == false) { rhs.initialize(std::move(**this))… in swap()
492 …else if (initialized() == false && rhs.initialized() == true) { initialize(std::move(*rhs)); rhs.… in swap()
493 …else if (initialized() == true && rhs.initialized() == true) { using std::swap; swap(**this, *rh… in swap()
498 explicit constexpr operator bool() const noexcept { return initialized(); } in operator bool()
501 return TR2_OPTIONAL_ASSERTED_EXPRESSION(initialized(), dataptr()); in operator ->()
507 assert (initialized()); in operator ->()
512 return TR2_OPTIONAL_ASSERTED_EXPRESSION(initialized(), contained_val()); in operator *()
516 assert (initialized()); in operator *()
521 assert (initialized()); in operator *()
526 …return initialized() ? contained_val() : (throw bad_optional_access("bad optional access"), contai… in value()
530 …return initialized() ? contained_val() : (throw bad_optional_access("bad optional access"), contai… in value()
534 if (!initialized()) throw bad_optional_access("bad optional access"); in value()
541 assert (initialized()); in operator ->()
546 return TR2_OPTIONAL_ASSERTED_EXPRESSION(initialized(), contained_val()); in operator *()
550 assert (initialized()); in operator *()
555 …return initialized() ? contained_val() : (throw bad_optional_access("bad optional access"), contai… in value()
559 …return initialized() ? contained_val() : (throw bad_optional_access("bad optional access"), contai… in value()