luabind::object assignment error

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

luabind::object assignment error

Szymon Gatner
Hi,

I am having weird error with object's binary "=" operator when used like so:

luabind::object obj = luabind::globals(L)["dummy"];

obj = 6;

Visual Studio 2008 SP1 gives:

"error C2679: binary '=' : no operator found which takes a right-hand
operand of type 'int' (or there is no acceptable conversion)"

documentation says that object has:

    template<class T>
    object& operator=(T const&);
    object& operator=(object const&);

and with that "you can assign it a new value with the assignment
operator (=)", but I checked object.hpp
and there is no such operator defined.

Additionally, changing code just a bit to:

luabind::globals(L)["dummy"] = 6;

which returns index_proxy<> instead of object compiles and works fine.

Regards,
Szymon Gatner

------------------------------------------------------------------------------
This SF.net Dev2Dev email is sponsored by:

Show off your parallel programming skills.
Enter the Intel(R) Threading Challenge 2010.
http://p.sf.net/sfu/intel-thread-sfd
_______________________________________________
luabind-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/luabind-user