From 065215864b33d21d910c9224902fd041921e988c Mon Sep 17 00:00:00 2001 From: ThePhD Date: Thu, 29 May 2014 02:38:02 -0400 Subject: [PATCH] libstdc++ is literally the dumbest thing in the world and does not properly remove const from types with references Must remove_reference before remove_cv --- sol/stack.hpp | 8 ++++---- sol/traits.hpp | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/sol/stack.hpp b/sol/stack.hpp index 067db106..acd00031 100644 --- a/sol/stack.hpp +++ b/sol/stack.hpp @@ -136,10 +136,10 @@ inline void push_arithmetic(std::false_type, lua_State* L, T x) { } } // detail -template +template> inline auto get(lua_State* L, int index = -1) --> decltype(detail::get_helper(std::is_arithmetic{}, L, index)) { - return detail::get_helper(std::is_arithmetic{}, L, index); +-> decltype(detail::get_helper(std::is_arithmetic{}, L, index)) { + return detail::get_helper(std::is_arithmetic{}, L, index); } template @@ -351,4 +351,4 @@ struct get_return { } // stack } // sol -#endif // SOL_STACK_HPP +#endif // SOL_STACK_HPP diff --git a/sol/traits.hpp b/sol/traits.hpp index 72c8de36..80f100b7 100644 --- a/sol/traits.hpp +++ b/sol/traits.hpp @@ -33,7 +33,7 @@ template using DisableIf = typename std::enable_if::type; template -using Unqualified = typename std::remove_reference::type>::type; +using Unqualified = typename std::remove_cv::type>::type; template using Decay = typename std::decay::type;