From 35dcd46d7de2755be15b4fef51044094ba38eee2 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Wed, 22 Mar 2017 16:55:19 +0100 Subject: [PATCH] remove cruft (following 6dc3bdf) --- libs/lua/LuaBridge/detail/TypeList.h | 60 ++++------------------------ 1 file changed, 8 insertions(+), 52 deletions(-) diff --git a/libs/lua/LuaBridge/detail/TypeList.h b/libs/lua/LuaBridge/detail/TypeList.h index 52284a4adf..07571325c8 100644 --- a/libs/lua/LuaBridge/detail/TypeList.h +++ b/libs/lua/LuaBridge/detail/TypeList.h @@ -67,6 +67,14 @@ struct TypeListValues /** TypeListValues recursive template definition. + + Note that for references and const references, + this template will not copy-construct the object. + + Special cases were intentionally removed in 6dc3bdf, becuase + we cannot simply copy-constructing Ardour Session Objects. + Lifetime is generally C++/boost managed and will + stay around for th lifetime of the TypeList. */ template struct TypeListValues > @@ -92,58 +100,6 @@ struct TypeListValues > } }; -// Specializations of type/value list for head types that are references and -// const-references. We need to handle these specially since we can't count -// on the referenced object hanging around for the lifetime of the list. - -template -struct TypeListValues > -{ - Head& hd; - TypeListValues tl; - - TypeListValues (Head& hd_, TypeListValues const& tl_) - : hd (hd_), tl (tl_) - { - } - - static std::string const tostring (bool comma = false) - { - std::string s; - - if (comma) - s = ", "; - - s = s + typeid (Head).name () + "&"; - - return s + TypeListValues ::tostring (true); - } -}; - -template -struct TypeListValues > -{ - const Head& hd; - TypeListValues tl; - - TypeListValues (Head const& hd_, const TypeListValues & tl_) - : hd (hd_), tl (tl_) - { - } - - static std::string const tostring (bool comma = false) - { - std::string s; - - if (comma) - s = ", "; - - s = s + typeid (Head).name () + " const&"; - - return s + TypeListValues ::tostring (true); - } -}; - //============================================================================== /** Subclass of a TypeListValues constructable from the Lua stack.