Conversation
|
Ah. That's what I was worried about when I implemented v2. Adding v3 was to demonstrate the option. Although I did get excited when, for me, it worked. This error suggests that the |
|
Correction, I was using them wrong. The way you did it actually works! |
|
Ah, that's a relief. Are all |
|
Cloning currently returns a unique_ptr so there it wouldn't work. But I believe that's actually the only thing that does so we should be able to switch that over. |
|
This doesn't mean you can't have raw pointer to |
|
I havent followed all the posts but I am wondering if the problem of recursion with templated patterns created by cloning could be revisited as well. |
|
I'm not aware of this issue. So far I've been fixing problems that I encounter myself. |
|
Yeah I did not understand how std::enable_shared_from_this worked at all, the things I said originally were just wrong. I pushed my own version of the fixes now, very closely related to yours so thank you very much for the pointers <3 |
|
Oh yeah the templates issue could be solved like this as well potentially. I'll look into it |
|
No worries. |
|
That would be awesome. being able to use recursion with templates makes some patterns so much easier to write. currently having to use parent and copying variables is doable but it can be hard to keep track of the information flow. |

Another attempt at a fix for Cast to int format error (Format function no longer accepts enums) #166
The previous attempt is here.
Both methods work, but this one is more in the spirit of how
shared_ptrs are intended to be used and smells less of hack.This one uses enable_shared_from_this.