Skip to content

Commit

Permalink
make value getter a template too
Browse files Browse the repository at this point in the history
  • Loading branch information
tchaloupka committed Feb 4, 2024
1 parent 4ad4d75 commit 9d5c4d3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions source/expected.d
Original file line number Diff line number Diff line change
Expand Up @@ -523,7 +523,7 @@ struct Expected(T, E = string, Hook = Abort)
It returns `T.init` when hook doesn't provide `onAccessEmptyValue`.
+/
@property auto ref inout(T) value() inout
@property auto ref inout(T) value()() inout
{
if (state != State.value)
{
Expand All @@ -534,7 +534,7 @@ struct Expected(T, E = string, Hook = Abort)
return getValue();
}
} else {
@property auto ref T value()
@property auto ref T value()()
{
checked = true;

Expand Down

0 comments on commit 9d5c4d3

Please sign in to comment.