
// Compile with:
//  clang++ -std=c++11 -stdlib=libc++ Section.cpp -o Section

#include <iostream>

using namespace std;

enum class MF : int {
    ZERO = 0,
    ONE = 1,
    TWO = 2
};

// --------- Specialization -------------
template <MF mf>
class Stat{
public:
    Stat(std::string msg) {
        cout << "Generic Stat construtor: " << msg << endl;
    }
};

// --------- Template Specialization -------------
template<>
class Stat<MF::ONE>{
public:
    Stat(std::string msg) {
        cout << "Specialized Stat constructor: " << msg << endl;
    }
};

// --------- Variadic Template -------------
template<MF mf, typename... E>
class Var{
public:
    Var(std::string msg){
        cout << "Generic Var constructor: " << msg << endl;
    }

};

// --------- Variadic Template Specialization -------------
template<>
class Var<MF::TWO, MF>{
public:
    Var(std::string msg){
        cout << "Specialized Var constructor: " << msg << endl;
    }
};

int main(){
    cout << "I'm still trying to figure out variadic templates." << endl;


    Stat<MF::ZERO> S_MF0("MF=0");
    Stat<MF::ONE> S_MF1("MF=1");

    Var<MF::ZERO> MF0("MF=0");
    Var<MF::ZERO, int> MF0_int("MF=0,E=int");
    Var<MF::ZERO, MF> MF0_MF1("MF=0,MF");


    return 0;
}
