Home | History | Annotate | Download | only in lua
      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 }
     43