The restriction hasn't been changed since C++11, and the corresponding restriction for destructors were added in C++20. The newly adopted P2448R2 talked about this, but didn't touch the reason.
Perhaps it was N1980 (the proposal for constexpr
before ) that added this restriction at first, but I failed to find the reason or motivation in it.
I also wonder whether there's anyone wanting to relax this restriction.
Aucun commentaire:
Enregistrer un commentaire