Mercurial > mm7
comparison lib/swig/swigwin-2.0.11/Lib/lua/std_pair.i @ 1899:b3009adc0e2f
Adding swig, gitignore, hgignore
author | Nomad |
---|---|
date | Mon, 21 Oct 2013 10:42:27 +0200 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
1867:eb580660bbbb | 1899:b3009adc0e2f |
---|---|
1 /* ----------------------------------------------------------------------------- | |
2 * std_pair.i | |
3 * | |
4 * std::pair typemaps for LUA | |
5 * ----------------------------------------------------------------------------- */ | |
6 | |
7 %{ | |
8 #include <utility> | |
9 %} | |
10 /* | |
11 A really cut down version of the pair class. | |
12 | |
13 this is not useful on its own - it needs a %template definition with it | |
14 | |
15 eg. | |
16 namespace std { | |
17 %template(IntPair) pair<int, int>; | |
18 %template(make_IntPair) make_pair<int, int>; | |
19 } | |
20 | |
21 | |
22 */ | |
23 | |
24 | |
25 | |
26 namespace std { | |
27 template <class T, class U > struct pair { | |
28 typedef T first_type; | |
29 typedef U second_type; | |
30 | |
31 pair(); | |
32 pair(T first, U second); | |
33 pair(const pair& p); | |
34 | |
35 T first; | |
36 U second; | |
37 }; | |
38 | |
39 template <class T, class U > | |
40 pair<T,U> make_pair(const T&,const U&); | |
41 | |
42 } |