class operator tonumber

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

class operator tonumber

Aron Bierbaum
I have a class that uses boost::varient to hold any integer, floating
point, or string value. In order to allow lua to easily handle this I
would like to override the lua tostring and tonumber operators to
return the correct type. Something like:

"1.45" = tostring(my_variant)
1.45 = tonumber(my_variant)

I believe that there is a way to do the tostring override using
Luabind, but I have not been able to find anything about tonumber. Is
it possible to override these operators?


The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
production scanning environment may not be a perfect world - but thanks to
Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
Series Scanner you'll get full speed at 300 dpi even with all image
processing features enabled.
luabind-user mailing list
[hidden email]