Description
This is the example program provided on the main page which showcases better inlining than vanilla inheritance.
https://godbolt.org/z/9h9qf87n5
It fails to compile with certain versions of clang, e.g. 12, 11, 10, 9 and 8. And it fails to compile with certain version of gcc.
I have no idea how to solve this.
I think it has something to do with when templates are "evaluated". The library checks for type completeness and uses requires__
a lot, I imagine to ensure the type is complete at the point where the poly is compiled. Something like that. Maybe for some compilers requires__
isn't enough, so the type is incomplete, so it can't determine the number of methods registered via te::call
and mappings::set
.
This could either be a compiler bug or the library is abusing a compiler mechanism that isn't guaranteed to work.