luabind::object assignment error

Szymon Gatner <[email protected]>
Newsgroups gmane.comp.lang.lua.bind.user
Message-ID <[email protected]>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.