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.