Replies: 4 comments 1 reply
-
|
You can't. Type has to be copyable. It's meant for types with value semantics. What's your use-case? |
Beta Was this translation helpful? Give feedback.
-
|
Thanks for answering, @arximboldi. My priority is to save memory and not have memory leaks. I was hoping that immer could keep different versions of a container without replicating any element. Is there such a possibility in immer? Perhaps using certain transient containers with selected memory strategies? |
Beta Was this translation helpful? Give feedback.
-
|
Hi @arximboldi , The elements of type You've mentioned immer::box as an alternative. How would it compare to smart pointers? Thank you very much, Fábio |
Beta Was this translation helpful? Give feedback.
-
|
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I need to use strictly move-only types in immer like:
immer::flex_vector<std::unique_ptr<unsigned char[]>> v;But this produces the following error:
How can std::unique_ptr be used in immer containers, please?
Fábio Pakk Selmi-Dei (@fabiopakk)
Beta Was this translation helpful? Give feedback.
All reactions