Grandimam
MModular
•Created by Grandimam on 4/12/2024 in #questions
Transfer operator inside constructor and moveinit
I have a question regarding using the transfer operator inside constructor and moveinit as shown in this example:
https://docs.modular.com/mojo/manual/lifecycle/life#move-constructor
This confuses me a little as I thought that the transfer operator was to be used only while calling the function or assignment something like this:
Now, what does it mean for the dunder methods to use ^ operator for assignment? Does it mean the same thing as mentioned above? I tried asking the bot for help as well, but it seems to think that this is an incorrect way of doing.
https://discord.com/channels/1087530497313357884/1228421383206473869/1228426919851327578
11 replies