From 6e82f9f6f0bf3d74bcafab3e41927f338c3f850a Mon Sep 17 00:00:00 2001 From: Daniel Wallin Date: Wed, 3 Sep 2008 10:24:35 +0200 Subject: [PATCH] Moved value_wrapper_traits. `object` needs to be complete, so I moved this below the `object` definition. --- luabind/object.hpp | 48 ++++++++++++++++++++++++------------------------ 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/luabind/object.hpp b/luabind/object.hpp index 58d2350..8265f57 100644 --- a/luabind/object.hpp +++ b/luabind/object.hpp @@ -701,30 +701,6 @@ struct value_wrapper_traits } }; -#ifndef LUABIND_USE_VALUE_WRAPPER_TAG -template -struct value_wrapper_traits > -#else -template<> -struct value_wrapper_traits -#endif -{ - typedef boost::mpl::true_ is_specialized; - - template - static lua_State* interpreter(adl::call_proxy const& proxy) - { - return value_wrapper_traits::interpreter(*proxy.value_wrapper); - } - - template - static void unwrap(lua_State* interpreter, adl::call_proxy const& proxy) - { - object result = const_cast&>(proxy); - result.push(result.interpreter()); - } -}; - namespace adl { class object_init @@ -834,6 +810,30 @@ namespace adl using adl::object; +#ifndef LUABIND_USE_VALUE_WRAPPER_TAG +template +struct value_wrapper_traits > +#else +template<> +struct value_wrapper_traits +#endif +{ + typedef boost::mpl::true_ is_specialized; + + template + static lua_State* interpreter(adl::call_proxy const& proxy) + { + return value_wrapper_traits::interpreter(*proxy.value_wrapper); + } + + template + static void unwrap(lua_State* interpreter, adl::call_proxy const& proxy) + { + object result = const_cast&>(proxy); + result.push(result.interpreter()); + } +}; + template<> struct value_wrapper_traits { -- 2.11.4.GIT