// Collection of code snippets by Arne Vajhøj 
// (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) 
#include <iostream>
#include <string>
#include <cstdlib>

using namespace std;

template<class T> T test(T a, T b)
{
    return a+b;
}

int main()
{
    cout << test<int>(123, 123) << endl;
    cout << test<double>(123.456, 123.456) << endl;
    cout << test<string>("abc", "abc") << endl;
    return 0;
}
