Reputation: 11
I am making a custom lua enviroment in c++ using metamethods. I am confused of what metamethod would call print()? I think it is __call but I am not quite sure.
Upvotes: 1
Views: 138
Reputation: 72392
No metamethod calls print
.
On the other hand, print
calls tostring
, which respects the __tostring
metamethod.
Upvotes: 3