#include <iostream>

using namespace std;

template <int n>
struct INT{
    enum {val = n};
};

template <typename A, typename B>
struct ADD{
    enum {val = A::val+B::val};
};

enum Foo {
  One,
  Two,
  Three,
  Last
};



struct enustr{
  enum t{a = 4, b = 3, c='s'};
};


int main()
{
    cout << "meta enum \n";
    
    typedef INT<6> six;
    typedef INT<5> cinq;
    typedef ADD<six,cinq> onze;
    
    cout << onze::val << endl;
    
    
for ( int fooInt = One; fooInt != Last; fooInt++ )
{
   Foo foo = static_cast<Foo>(fooInt);
   // ...
   //cout << foo << endl;
}
    
    enustr test;
    cout << test.a;
    cout << test.b;

    
    return 0;
}
