binding reference to scalar types: shouldn't it work already?

Lorenzo Pistone <[email protected]> Wed, 10 Apr 2013 03:03:46 +0200
Newsgroups gmane.comp.lang.lua.bind.user
Message-ID <[email protected]>
Hello,
I'm trying to bind a reference to a bool. This thing compiles:

     globals(L)["dotrap"] = boost::ref(dotrap);

but at compile time I get the following exception:

     terminate called after throwing an instance of 'std::runtime_error'
       what():  Trying to use unregistered class

It looks like that luabind is treating a reference to a bool as a user 
defined type. So... it isn't able by default to bind references to 
simple bools?
By the way, luabind does know about bool, in fact I can do

     globals(L)["dotrap"] = dotrap;

but here I create a copy of the value, which is not what I want to do.

Cheers.

------------------------------------------------------------------------------
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis & visualization. Get a free account!
http://www2.precog.com/precogplatform/slashdotnewsletter