Commit Graph

66 Commits

Author SHA1 Message Date
ThePhD
ff7326ed96 We now have the ability to get a userdata that has been created C++ style out of lua
Using `auto` and `decltype` in more places that MSVC can handle it -- using type traits in other places to avoid VC++'s chokes
More flexibility, woo!
2014-05-09 10:48:55 -04:00
ThePhD
d7ea4718c8 multi_return<> name to return_type<> .
Makes more sense, as the return does not always have to be multiple types.
(Indeed, it is specialized for 1 and 0 cases).
2014-05-08 13:08:21 -04:00
ThePhD
c0b565fa3d Renamed many parts of lua_function.hpp to make more sense.
Added pop() function to `reference`
`stack.hpp` now has many more functions to properly handle user data
`types.hpp` now has `userdata_t` and `lightuserdata_t` to faciliate `stack`'s `pop` and `push` operations
Class binding functionality built into `table` and `state`, as well as placed in `userdata` class in `userdata.hpp`
demangling detail now present for clang, gcc, and MSVC (somewhat for MSVC)
Constructor arity still needs to be handled for `userdata<T>`
tests updated and passing
2014-04-25 20:20:35 -04:00
ThePhD
750d110a92 Fixing formatting to make sure everything's nice and pretty. 2013-12-21 22:11:20 -05:00
ThePhD
ef223ecaeb I wish C++ didn't demand that functions have to appear before each other in lexographic order. =/ 2013-12-21 19:39:51 -05:00
ThePhD
b90f789986 operator[] support~
And all is as it should be in the world~
2013-12-21 19:30:30 -05:00
Rapptz
ac975872ad Remove support for operator[] on tables 2013-12-16 11:07:10 -05:00
ThePhD
ed0b83f8b0 Several changes. I took away operator() for the proxy type, because it'd interfere with the Callable type and all. Alas, good things do die I suppose. =[
But! I left it on the `sol::function` type, because it's necessary to discard returns. The .call is still there, though, just incase you need it. <3
reverse_indices_builder is also there, to make sure we can push and pop without the lua api taking our types and breaking them for the std::tuple returns.
All is at it should be~
2013-12-14 23:25:44 -05:00
ThePhD
b655c07258 Merge remote-tracking branch 'root/master' 2013-12-14 20:07:35 -05:00
Rapptz
5341682503 Change tabs to spaces 2013-12-14 04:42:53 -05:00
ThePhD
25f42b4bd3 A hefty slice of changes for functions on the proxy. Not necessary, but was fun to get around MSVC's ICE errors. 2013-12-14 00:15:14 -05:00
ThePhD
9624dd93e7 VC++ Compat again. 2013-12-13 20:09:51 -05:00
ThePhD
856d28ab70 EnableIf and DisableIf back in place, type trait fixed for MSVC. Bleh, this is a lot of work. Removed functional header, because nobody's using it. 2013-12-13 14:59:46 -05:00
ThePhD
2192e98eec MSVC needs explicit overloads and explicit =default operators on sol::function. It's quite whacky, really. Anyway, it compiles, so let's just make sure this works for GCC too. 2013-12-13 14:16:59 -05:00
Rapptz
af0097fb7f Add support for setting functions with operator[] 2013-12-12 19:48:26 -05:00
Rapptz
7cc8c93289 Move type traits to its own header and clean up code using the traits 2013-12-12 18:43:36 -05:00