diff --git a/fwdpp/ts/types/tree_sequence.hpp b/fwdpp/ts/types/tree_sequence.hpp index 475fc9548..6eeebca71 100644 --- a/fwdpp/ts/types/tree_sequence.hpp +++ b/fwdpp/ts/types/tree_sequence.hpp @@ -43,11 +43,12 @@ namespace fwdpp } #if __cplusplus >= 201703L - std::optional&> + std::optional>> tree() const { // FIXME: should be nullopt if no more trees - return std::optional&>{ + return std::optional< + std::reference_wrapper>>{ std::cref(tree_)}; } #endif