Commit Graph

26 Commits

Author SHA1 Message Date
ThePhD
644a5c549b modifying tests to find out where crash is... 2017-08-11 09:59:42 -04:00
ThePhD
eb1560d12a add as_container documentation
improve exception documentation
improve state_view default handlers
add SAFE_PROPAGATION defines for compiling C++ as Lua
add examples for automatic operator registrations and as_container
fix tutorial code
change tests to not throw unless absolutely necessary
provide synchronization for file writing in tests
provide thread safety around thread tests for REQUIRE
add ostream automatic support
change 5.1 compat to only kick in luaL_loadbufferx and luaL_loadfilex when LuaJIT is version 2.0.1 and lower
2017-08-11 03:24:17 -04:00
ThePhD
f1ff3d6492 improve tests
change the default chunk name (and make it trail off if chunk name is too small)
minor changes to appease g++'s and clang++'s many warnings
2017-08-07 07:54:43 -04:00
ThePhD
ca685e01c9 gcc plagues me , and will continue to, for a while to come
BUT IT WOOORKS!
2017-08-07 02:07:21 -04:00
ThePhD
104485bebd this mega commit prepares to fix all of the issues listed in the repository for the past 3 weeks 2017-08-05 19:20:28 -04:00
ThePhD
e69e7c79fa C++17 additions: std::variant, string_views of all types, checker for if we have the right version
added variadic_results, to return a variable number of arguments to Lua
added variadic_results and as_results
added improved function examples (for multiple results and split overloading out)
added tests for variadics
added tests for C++17 utilities
added a forwarding header
added a specific `unsafe_function` header
added and improved documetation pages
2017-07-09 12:54:52 -04:00
ThePhD
17271c84cb BREAKING CHANGE: std::pair for regular containers that are not marked as as_table_t or as_nested will now behave like regular containers and not force themselves to be key-value pairs. table-style serialization is still unaffected. 2017-06-23 18:07:24 -04:00
ThePhD
ea895b4338 hard errors for container usertypes if SOL_CHECK_ARGUMENTS is defined.
otherwise, as usual, we assume you know what you're doing
2017-06-03 06:25:06 -04:00
ThePhD
51245a9e7b go to hell, gcc and clang 2017-05-29 13:06:37 -04:00
ThePhD
fd8e2df92e fix some semantics for container usertypes, their iterators, and how they push their value types (to cope with crappy input iterator "containers")
add better handling for `readonly` to prevent bugs from `const`-ifying the return value of a member variable (e.g., unexpected copy semantics)
add more tests and add a few more handlers for new readonly type
fix simple_usertype_metatable's handling of newindex and index when not at the top level
2017-05-29 10:32:37 -04:00
ThePhD
6047f48343 vet container_usertype and wrap for the proper traits regarding assignment and checking of said assignments
update documentation with more tips and other similar things
2017-05-20 20:01:04 -04:00
Carlos Carrasco
7b78558413 add test for map 2017-05-03 18:54:38 -04:00
Carlos Carrasco
e13711ed84 add find method to containers to make fast lookups into set/unordered_set 2017-05-03 18:54:38 -04:00
ThePhD
814562260d Fixes #394 2017-04-08 08:25:49 -04:00
ThePhD
144892c633 The way exceptions are handled is borderline sadface in C++ on various platforms. I wish DLL boundaries and crap weren't so fragile. 2017-03-16 15:53:51 -04:00
ThePhD
ed6ae23d2e Accidentally put a critical check inside of a SOL_SAFE_USERTYPE define... Buh. 2017-03-16 10:12:17 -04:00
RaptorFactor
cee7d16412 Fix building tests with Catch v1.7.2.
From the Catch docs:
Please note that the THROW family of assertions expects to be passed a single
expression, not a statement or series of statements. If you want to check a
more complicated sequence of operations, you can use a C++11 lambda function.

https://github.com/philsquared/Catch/blob/master/docs/assertions.md

In current versions of Catch violating this causes a build error.
2017-02-17 18:40:51 -08:00
ThePhD
433e34cd9b as_args and threading API cleanliness. 2016-11-26 13:58:06 -05:00
ThePhD
1461ab780c Fix an idiot derp in the code
and stop having sleep attacks...
2016-11-14 13:42:55 -05:00
ThePhD
3b4dd52caf Fix is_container derp that triggered fault construction of pointer types 2016-11-07 13:52:20 -05:00
ThePhD
db7b4f22f2 Prepare for release. 2016-11-05 23:17:31 -04:00
ThePhD
52f69a2653 Heavily improve documentation and add new container functions. 2016-11-05 20:08:07 -04:00
ThePhD
cbe599a901 Referential transparency is important. 2016-09-28 19:05:26 -04:00
ThePhD
5b5d1e9ca6 MIGHT AS WELL. 2016-08-27 08:45:37 -04:00
ThePhD
54cffb7b6d tables and userdata and pairs and ipairs, oh my 2016-08-24 08:31:18 -04:00
ThePhD
cf76f6baa0 V E T T E D
Slight breaking change, but at the source level almost nothing changes (ipairs is the only thing that changes because for some reason it checks if what is passed is a table and that really doesn't make any fucking sense)
Closes #195
Closes #196
2016-08-23 21:42:27 -04:00