fdpp
fdpp copied to clipboard
rfe: conwert SymMemb to smart references
c++23 will have smart references. This will allow us to turn the sym wrappers into a proxy objects.
Which would mean a gcc compatibility hopefully. But its quite a big rework. Whether or not the gcc compatibility worth the trouble, is an open question. And when this is going to be implemented in gcc, is difficult to say. clang just works...
Related material: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2017/p0352r1.pdf http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0416r1.pdf
As became obvious from the failed #166 attempt, such wrappers should be squashed into AsmXXX classes.
https://github.com/dosemu2/fdpp/issues/56#issuecomment-1549155560 https://github.com/dosemu2/fdpp/issues/56#issuecomment-461922396
If we can use smart references, perhaps the inability to modify temporaries will be circumvented by relaying an access via an internal pointer to the child object, rather than the memcpy() to the inherited self. #56 will use the explicit lifetime management, so such pointers might be possible. It however seems that smart references are not happening in C++23.