te icon indicating copy to clipboard operation
te copied to clipboard

Does not compile on certain versions of gcc and clang

Open pfeatherstone opened this issue 2 years ago • 1 comments

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.

pfeatherstone avatar May 29 '22 08:05 pfeatherstone

@krzysztof-jusiak @kris-jusiak Do you have an update on how to solve this ?

pfeatherstone avatar Sep 02 '22 10:09 pfeatherstone