summaryrefslogtreecommitdiff
path: root/share/swig/2.0.11/lua/std_pair.i
diff options
context:
space:
mode:
Diffstat (limited to 'share/swig/2.0.11/lua/std_pair.i')
-rw-r--r--share/swig/2.0.11/lua/std_pair.i42
1 files changed, 42 insertions, 0 deletions
diff --git a/share/swig/2.0.11/lua/std_pair.i b/share/swig/2.0.11/lua/std_pair.i
new file mode 100644
index 0000000..0672853
--- /dev/null
+++ b/share/swig/2.0.11/lua/std_pair.i
@@ -0,0 +1,42 @@
+/* -----------------------------------------------------------------------------
+ * std_pair.i
+ *
+ * std::pair typemaps for LUA
+ * ----------------------------------------------------------------------------- */
+
+%{
+#include <utility>
+%}
+/*
+A really cut down version of the pair class.
+
+this is not useful on its own - it needs a %template definition with it
+
+eg.
+namespace std {
+ %template(IntPair) pair<int, int>;
+ %template(make_IntPair) make_pair<int, int>;
+}
+
+
+*/
+
+
+
+namespace std {
+ template <class T, class U > struct pair {
+ typedef T first_type;
+ typedef U second_type;
+
+ pair();
+ pair(T first, U second);
+ pair(const pair& p);
+
+ T first;
+ U second;
+ };
+
+ template <class T, class U >
+ pair<T,U> make_pair(const T&,const U&);
+
+}