
11 Mar
2025
11 Mar
'25
1:17 p.m.
On Tue, Mar 11, 2025 at 1:50 PM Jean-Louis Leroy via Boost
Quick question: Given the ability to return different (necessarily related?) types from the same open-method, can we say BOM allows co-variant return type? Like virtual methods / polymorphism allows, just more flexible that plain pointers?
Yes. And in that case, the return type can act as a tie-breaker, as described in N2216.
Thanks again JLL. I see now this is explicitly treated in the (old) [N2216 paper][1], in fact. Regarding Boost.TypeErasure, in preparation for the review, a few words in the doc to compare/contrast them might be warranted. I look forward to the review. Thanks, --DD [1]: https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2216.pdf