Date: Fri, 02 Aug 2024 22:00:48 +0400
By using https://en.cppreference.com/w/cpp/utility/any/type
It would have been very weird if we had a type that hide your data and then couldn't recover it, that would be the sort of thing that shouldn't end up in the standard. Good thing that is not what happened.๐๐That's exactly the algorithm i was describing.Now you're starting to understand me.The advantage of my approach, is that it is more effecient and safe.No std::function type erasure overhead.No hashing or type mangling.No manual interactionInstead of saving type_index, we stamp directly the function calls. The compiler registers for you the handlers based on templated functions.At call site, the compiler is free to choose, unrolling loops, splitting loop into unrolled + loop, depending on loop size, number of registred types.Compiler can see through translation units, and register automatically what it finds.....etcThat's amazing...we are making progress finally.Keep in mind, that the example in link you've sent, is only one consequence of the proposal.As i said in previous post, i don't know yet, the extent of this proposal, because it was not my original motivation.I'm very happy that we are, talking real business now, not fake interviews.Let's keep progressing guys...bravo.
It would have been very weird if we had a type that hide your data and then couldn't recover it, that would be the sort of thing that shouldn't end up in the standard. Good thing that is not what happened.๐๐That's exactly the algorithm i was describing.Now you're starting to understand me.The advantage of my approach, is that it is more effecient and safe.No std::function type erasure overhead.No hashing or type mangling.No manual interactionInstead of saving type_index, we stamp directly the function calls. The compiler registers for you the handlers based on templated functions.At call site, the compiler is free to choose, unrolling loops, splitting loop into unrolled + loop, depending on loop size, number of registred types.Compiler can see through translation units, and register automatically what it finds.....etcThat's amazing...we are making progress finally.Keep in mind, that the example in link you've sent, is only one consequence of the proposal.As i said in previous post, i don't know yet, the extent of this proposal, because it was not my original motivation.I'm very happy that we are, talking real business now, not fake interviews.Let's keep progressing guys...bravo.
Received on 2024-08-02 18:01:00