Commit Graph

45 Commits

Author SHA1 Message Date
ThePhD
0c9d567d0a "automatic usertypes" are now applied everywhere, regardless of what happens
new sol::filters (currently undocumented)
new gc tests, new plain_type tests
core abstractions over usertypes streamlined
SOL_STRINGS_ARE_NUMBERS triggers added
update single
2017-08-21 15:25:43 -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
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
da28527421 prepare for container_traits to be a thing
update large parts of the documentation and add a new section to streamline information about functions
2017-07-01 11:02:15 -04:00
ThePhD
1a6937e24e Revert previous change of not pushing nil when we encounter a nullptr from special usertypes. If people want to check, they'll need to use optional or a raw pointer: messing with the raw usertype can also lead to some surprising problems, so we don't need to specialize for that use case. 2017-06-30 18:18:25 -04:00
ThePhD
0973d789fa add a second parameter, forget to write it in the test
what am I good for aaah
2017-06-26 10:20:53 -04:00
ThePhD
af2136ba00 Closes #431
If only I had a test that took a unique_ptr as a second argument. RIP.
2017-06-26 10:10:47 -04:00
ThePhD
11916a7c72 add noexcept function type barriers and guards
noexcept-proof function call trampolines
add noexcept tests to ensure its being checked
TODO: check g++ 7.1 builds when using -std=c++17 ...
2017-06-16 18:43:40 -04:00
Rohlem
db39b2f316 added test cases for noexcept functions
All pass in C++14, broken in C++17
2017-06-16 13:35:28 -04:00
ThePhD
0fb53335c4 this commit adds support for differentiating between multiple different unique_usertypes without actually having to store type information. It does not include the ability to override a unique_usertype label for a specific type, but that might not prove necessary if differentiation remains possible with this methodology
Complete fixes #422 and addresses #423
2017-06-15 01:23:51 -04:00
ThePhD
85620df63c new checker for unique_usertype to ensure type safety, when SOL_CHECK_ARGUMENTS or a protected tag is used to protect a function 2017-06-13 16:34:18 -04:00
ThePhD
661386c384 revert codecvt fix for MinGW v7 and greater
add docs about compiler support
add notes about compilation issues
update single
2017-06-07 12:33:59 -04:00
ThePhD
51d6f6fa54 You would think that we'd have accounted for this earlier...
Fixes #405
2017-05-16 06:12:28 -04:00
ThePhD
bf7ddd7bde Update catch internally and make sure there's no errors in the tests for unused variables 2017-02-18 05:05:33 -05: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
490194f767 allow va_args to work with overloading, albeit things can get... bad, with it. Need to observe this more to make sure things don't go poorly. 2017-01-09 16:38:23 -05:00
ThePhD
7b63057ba8 PRAISE BASED EEVEE 2016-11-26 03:32:28 -05:00
ThePhD
ed21ba792c henshin a-go-go ba- no not really it's just a minor patch version bump... 2016-11-23 02:49:44 -05:00
ThePhD
b40f895fd4 Fix double-delete crash that could also be affecting @IronsDu 2016-11-23 02:39:52 -05:00
ThePhD
009d6b0fa9 Fix protected_function shenanigans, hopefully for good. 2016-10-04 23:37:08 -04:00
ThePhD
b05ce97247 Allllll the fixes. All the time. Mostly to make sure constructors don't fight with each other and safety is respected. And documentation updates. 2016-10-01 01:27:40 -04:00
ThePhD
d7b037da73 Sigh. Make sure that tuple expansion works in buggy VC++ compiler. 2016-09-26 04:02:03 -04:00
Kevin Brightwell
b79498cb40 Replace std::cout with INFO() from catch
* Removes unecessary verbosity.

I tried to wrap the `INFO` calls in a lua function to remove some of the
`print()` statements, but it turns out Catch relies on the macros heavily,
so that fails.
2016-08-22 13:36:27 -04:00
ThePhD
c6b47c8d18 Improve and fix optional, avoid LuaJIT bullshit 2016-07-09 14:18:57 -04:00
ThePhD
febfdbadb7 protect could use some additional optimizations for space, but I'm kinna tired. 2016-07-09 03:43:51 -04:00
ThePhD
14ced4af69 Add more tests and fix smaller errors with overloading and such. 2016-07-09 01:12:33 -04:00
ThePhD
27174aba9c This mega-commit produces simple_usertype to allow for faster compile times by avoiding the use of __index internally. It sacrifices some speed and some storage optimizations and also does not allow variable syntax, but the produced table is directly modifiable.
Adds a `protect()` function to trigger safety for an item.
This commit also optimizes away all instances of virtual function calls for function calls and storage. Will need to test speed to see how it works out.
Closes #133
Closes #134
Closes #135
Closes #136
2016-07-07 16:52:39 -04:00
ThePhD
29e4b82b4a Formally introduce c_call to the API with overloading ability
More documentation on how things work.
Once more at a 'feature-complete' state. Continue to work on #116.
Add testcase to ensure #108 is fixed. Then, prep release.
2016-06-18 03:32:54 -04:00
ThePhD
c458849d29 Many of the tests are still busted, but we're getting closer.
Closes #96
Closes #79
Fixes #105 - but we still need to double-check and add a test to prove it
2016-06-06 15:46:53 -04:00
ThePhD
7be09d0781 Who would have thought Lua's API between versions would be so... inconsistent. 2016-05-20 04:20:22 -04:00
ThePhD
06fecfb4ca Fix optional usages and edge cases. Closes #74 2016-05-02 01:52:51 -04:00
ThePhD
b19d1a0854 Update version numbers, fix tests, and change bond -> tie, since nobody understands what bond means 2016-04-24 10:09:05 -04:00
ThePhD
006357430b Shiny quick 'n' dirty tutorial -- variadic_args now is iterable -- fixed bug with transparent args in overload resolution -- added load functions 2016-04-23 17:07:51 -04:00
ThePhD
96da27d565 Ensure argument transparency. 2016-04-18 08:27:30 -04:00
ThePhD
88155d44e0 sol::property is implemented for usertypes now
sol::this_state is  a transparent argument that gets the current state at any position in any callback
sol::variadic_args allows a person to get something that can reference the "rest of the arguments", though it doesn't enforce that it has to be the last argument

Closes #57
Closes #59
Closes #60
2016-04-17 02:18:34 -04:00
ThePhD
42f4455383 Allow for "static functions" to be registered on userdata like other parts of the framework, as well as self-contained structs and lambas.
sol::readonly for the ability to make a variable set on a userdata readonly.
No support for property yet: put on issues list for later
2016-04-11 01:02:43 -04:00
ThePhD
eb91320652 <_< 2016-04-07 05:53:33 -04:00
ThePhD
9de3ed48e1 >_> 2016-04-07 05:46:49 -04:00
ThePhD
4cdcac2001 Ensure compilation for 2 more function types 2016-04-07 05:43:44 -04:00
ThePhD
8862c65f0a NOW we're truly feature complete. Sheesh, the work that this requires.... 2016-03-31 16:16:07 -04:00
ThePhD
7af3fc4ffa Added nullopt pushing, optional pushing, improved tests 2016-03-30 16:52:51 -04:00
ThePhD
5acb33e2bc full-on optional support. so much support it's coming through my eyeballs. Goodness.
Support for c_call wrapper to be a thing.
2016-03-30 00:31:18 -04:00
ThePhD
d52bc23f53 Mooooar tests. And better support for proxy and tuples. 2016-03-15 06:36:25 -04:00