molpopgen / fwdpp

fwdpp is a C++ template library for implementing efficient forward-time population genetic simulations
http://fwdpp.readthedocs.io
GNU General Public License v3.0
27 stars 11 forks source link

Change return types for operators in fwdpp::enum_bitflags. #281

Closed molpopgen closed 4 years ago

molpopgen commented 4 years ago

This PR changes the behavior of operators introduced in #279. Now, the | operator returns the underlying type and |= returns the enum type. The reason is that the former is often used to ask about the existence of values and the latter used to update a flag. We want the first case to be boolean-like and the latter to retain its "enum-ness".