Skip to content

Commit

Permalink
Add operator-> to option<T>.
Browse files Browse the repository at this point in the history
Chase Geigle committed Aug 21, 2016

Verified

This commit was signed with the committer’s verified signature.
npezza93 Nick Pezza
1 parent 21e1f23 commit 73b2a89
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions include/cpptoml.h
Original file line number Diff line number Diff line change
@@ -66,6 +66,11 @@ class option
return value_;
}

const T* operator->() const
{
return &value_;
}

const T& value_or(const T& alternative) const
{
if (!empty_)

0 comments on commit 73b2a89

Please sign in to comment.