diff --git a/sol/object.hpp b/sol/object.hpp index 9aee1b52..ef7ae187 100644 --- a/sol/object.hpp +++ b/sol/object.hpp @@ -32,7 +32,8 @@ public: object() = default; template - T as() const { + auto as() const + -> decltype(stack::get(state())) { push(); type_assert(state(), -1, type_of()); return stack::get(state());