Lines Matching refs:other
195 Optional(const Optional& other) : base_flag(other.constructed()) { in Optional() argument
197 new (&get()) T(other.get()); in Optional()
200 Optional(Optional&& other) : base_flag(other.constructed()) { in Optional() argument
202 new (&get()) T(std::move(other.get())); in Optional()
210 Optional(const Optional<U>& other) : base_flag(other.constructed()) { in Optional() argument
212 new (&get()) T(other.get()); in Optional()
220 Optional(Optional<U>&& other) : base_flag(other.constructed()) { in Optional() argument
222 new (&get()) T(std::move(other.get())); in Optional()
246 Optional& operator=(const Optional& other) {
247 if (&other == this) {
252 if (other.constructed()) {
253 get() = other.get();
259 if (other.constructed()) {
260 new (&get()) T(other.get());
270 Optional& operator=(Optional&& other) {
272 if (other.constructed()) {
273 get() = std::move(other.get());
279 if (other.constructed()) {
280 new (&get()) T(std::move(other.get()));
292 Optional& operator=(const Optional<U>& other) {
294 if (other.constructed()) {
295 get() = other.get();
301 if (other.constructed()) {
302 new (&get()) T(other.get());
314 Optional& operator=(Optional<U>&& other) {
316 if (other.constructed()) {
317 get() = std::move(other.get());
323 if (other.constructed()) {
324 new (&get()) T(std::move(other.get()));
340 Optional& operator=(U&& other) {
342 get() = std::forward<U>(other);
344 new (&get()) T(std::forward<U>(other));