diff --git a/source/coral.cpp b/source/coral.cpp index 139c8a1..e8bdc5d 100755 --- a/source/coral.cpp +++ b/source/coral.cpp @@ -452,7 +452,7 @@ export namespace coral { /** * Constructs from `value`, creating an [expected] with the expected type. */ - expected(expects const & value) { + constexpr expected(expects const & value) { (*reinterpret_cast(this->buffer)) = value; this->buffer[buffer_size] = 1; } @@ -460,7 +460,7 @@ export namespace coral { /** * Constructs from `error`, creating an [expected] with an error. */ - expected(errors const & error) { + constexpr expected(errors const & error) { (*reinterpret_cast(this->buffer)) = error; }