summaryrefslogtreecommitdiff
path: root/libs/lua
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2017-03-22 16:55:19 +0100
committerRobin Gareus <robin@gareus.org>2017-03-22 16:55:19 +0100
commit35dcd46d7de2755be15b4fef51044094ba38eee2 (patch)
tree2281c31b846464fa126129f04e0a5b47328ab7fc /libs/lua
parenta199477cf675c58d0303aec75d1ee61e5bbca8ac (diff)
remove cruft (following 6dc3bdf)
Diffstat (limited to 'libs/lua')
-rw-r--r--libs/lua/LuaBridge/detail/TypeList.h60
1 files 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 <typename Head, typename Tail>
struct TypeListValues <TypeList <Head, Tail> >
@@ -92,58 +100,6 @@ struct TypeListValues <TypeList <Head, Tail> >
}
};
-// 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 <typename Head, typename Tail>
-struct TypeListValues <TypeList <Head&, Tail> >
-{
- Head& hd;
- TypeListValues <Tail> tl;
-
- TypeListValues (Head& hd_, TypeListValues <Tail> 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 <Tail>::tostring (true);
- }
-};
-
-template <typename Head, typename Tail>
-struct TypeListValues <TypeList <Head const&, Tail> >
-{
- const Head& hd;
- TypeListValues <Tail> tl;
-
- TypeListValues (Head const& hd_, const TypeListValues <Tail>& 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 <Tail>::tostring (true);
- }
-};
-
//==============================================================================
/**
Subclass of a TypeListValues constructable from the Lua stack.