Skip to content

Commit

Permalink
optional should wrap a reference_wrapper
Browse files Browse the repository at this point in the history
  • Loading branch information
molpopgen committed Jul 7, 2021
1 parent cf96361 commit 3887604
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions fwdpp/ts/types/tree_sequence.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,12 @@ namespace fwdpp
}

#if __cplusplus >= 201703L
std::optional<const marginal_tree<SignedInteger>&>
std::optional<std::reference_wrapper<const marginal_tree<SignedInteger>>>
tree() const
{
// FIXME: should be nullopt if no more trees
return std::optional<const marginal_tree<SignedInteger>&>{
return std::optional<
std::reference_wrapper<const marginal_tree<SignedInteger>>>{
std::cref(tree_)};
}
#endif
Expand Down

0 comments on commit 3887604

Please sign in to comment.