Lines Matching defs:optional
68 namespace optional { namespace
69 template<typename T> struct optional { struct
70 bool has;
71 union { T value; };
73 optional() : has(false) {} in optional() function
75 optional(U &&...u) : has(true), value(forward<U>(u)...) {} in optional() argument
77 optional(const optional &o) : has(o.has) { in optional() function
80 optional(optional &&o) : has(o.has) { in optional() function
84 optional &operator=(const optional &o) { in operator =()
95 optional &operator=(optional &&o) { in operator =()
107 ~optional() { in ~optional()
112 explicit operator bool() const { return has; } in operator bool()
113 T &operator*() { return value; } in operator *()