update single

This commit is contained in:
ThePhD 2018-03-03 13:42:44 -05:00
parent cd13f2dc0d
commit 2e1fcd32dd
2 changed files with 13 additions and 7 deletions

View File

@ -20,8 +20,8 @@
// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
// This file was generated with a script.
// Generated 2018-03-02 15:09:13.996712 UTC
// This header was generated with sol v2.19.4 (revision 94a6390)
// Generated 2018-03-03 18:42:29.548819 UTC
// This header was generated with sol v.2.19.4 (revision cd13f2d)
// https://github.com/ThePhD/sol2
#ifndef SOL_SINGLE_INCLUDE_HPP
@ -7899,7 +7899,12 @@ namespace stack {
template <typename Handler>
static bool check(lua_State* L, int index, Handler&& handler, record& tracking) {
tracking.use(1);
return true;
bool success = is_lua_reference<T>::value || !lua_isnone(L, index);
if (!success) {
// expected type, actual type
handler(L, index, type::poly, type_of(L, index), "");
}
return success;
}
};
@ -9551,15 +9556,16 @@ namespace stack {
typedef std::integral_constant<bool, V_size::value == 0> V_is_empty;
template <typename Handler>
static optional<V> get_empty(std::true_type, lua_State* L, int index, Handler&& handler, record& tracking) {
static optional<V> get_empty(std::true_type, lua_State*, int, Handler&&, record&) {
return nullopt;
}
template <typename Handler>
static optional<V> get_empty(std::false_type, lua_State* L, int index, Handler&& handler, record& tracking) {
static optional<V> get_empty(std::false_type, lua_State* L, int index, Handler&& handler, record&) {
typedef std::variant_alternative_t<0, V> T;
// This should never be reached...
// please check your code and understand what you did to bring yourself here
// maybe file a bug report, or 5
handler(L, index, type::poly, type_of(L, index), "this variant code should never be reached: if it has, you have done something so terribly wrong");
return nullopt;
}

View File

@ -20,8 +20,8 @@
// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
// This file was generated with a script.
// Generated 2018-03-02 15:09:14.750440 UTC
// This header was generated with sol v2.19.4 (revision 94a6390)
// Generated 2018-03-03 18:42:29.769950 UTC
// This header was generated with sol v.2.19.4 (revision cd13f2d)
// https://github.com/ThePhD/sol2
#ifndef SOL_SINGLE_INCLUDE_FORWARD_HPP