Closed molpopgen closed 9 years ago
To replicate the bug using the (current) dev code (https://github.com/molpopgen/fwdpp/commit/bf746146142f44dccccf8a5721acfd607cb76842):
The output will be:
migsel_ind: ../fwdpp/internal/recombination_common.hpp:70: void KTfwd::fwdpp_internal::recombine_gametes(const double_vec_type&, gamete_cont_iterator&, gamete_cont_iterator&, gamete_type&, gamete_type&) [with double_vec_type = boost::container::vector
Fixed upstream in dev, and fix will be part of 0.2.8 release.
When a copy of the parents is made, the current code in master reads (diploid_functions_ind_based.tcc, metapop version of sample_diploid):
decltype(_diploids) parents(_diploids);
It looks like this was a failed attempt at being clever, resulting in the type of parents being a non-const reference to diploids, meaning that updating the diploids updates the parents, too.