下面代码的输出结果
#include <iostream>
using namespace std;
int g=0;
template<typename T>
int foo()
{
static int value = ++g;
return value;
}
int main(int argc, char* argv[])
{
cout<<foo<int>()<<foo<bool>()<<foo<float>()<<foo<bool>()<<foo<int>()<<foo<char>();
cout<<endl;
return 0;
}
>> ./a.out
123214