From c5d43bcfb6021f57450cc6a80a11b980ee718e1d Mon Sep 17 00:00:00 2001 From: ThePhD Date: Thu, 29 May 2014 02:32:05 -0400 Subject: [PATCH] as uses auto and decltype for return type --- sol/object.hpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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());