From 99200d3bfbb614e1e1c7dc7aab322aa659fd8b4c Mon Sep 17 00:00:00 2001 From: ridiculousfish Date: Fri, 23 Feb 2018 21:28:36 -0800 Subject: [PATCH] Attempt to fix the Linux Travis build --- src/maybe.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/maybe.h b/src/maybe.h index e4c1fc20c..73939471c 100644 --- a/src/maybe.h +++ b/src/maybe.h @@ -39,6 +39,13 @@ class maybe_t { // Construct a maybe_t from a value T. /* implicit */ maybe_t(const T &v) : filled(true) { new (storage) T(v); } + // Copy constructor. + maybe_t(const maybe_t &v) { + if (v.filled) { + new (storage) T(v.value()); + } + } + // Move constructor. /* implicit */ maybe_t(maybe_t &&v) { if (v.filled) {