Skip to content

Commit 589cf12

Browse files
committed
Make more changes to make things compile and work like the old nullable
1 parent aef95c1 commit 589cf12

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

src/app/data-model/Nullable.h

+3-6
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ struct Nullable : protected std::optional<T>
4444
// The following 'using' statement is needed to make visible
4545
// all constructors of the base class within this derived class.
4646
//
47-
using std::optional<T>::value;
47+
using std::optional<T>::optional;
4848
using std::optional<T>::operator*;
4949
using std::optional<T>::operator->;
5050

@@ -68,11 +68,8 @@ struct Nullable : protected std::optional<T>
6868
return std::optional<T>::value_or(std::forward<Args>(args)...);
6969
}
7070

71-
template <typename... Args>
72-
constexpr auto Value(Args &&... args) const
73-
{
74-
return std::optional<T>::value(std::forward<Args>(args)...);
75-
}
71+
constexpr const T & Value() const { return **this; }
72+
T & Value() { return **this; }
7673

7774
// For integer types, being nullable involves a range restriction.
7875
template <

0 commit comments

Comments
 (0)