class value {
template<typename T> T value_1;
float value_2;
public:
template<typename T> void Set1(T first) {
value_2 = (float)0;
value_1 = first;
}
void Set2(float second) {
value_2 = second;
}
float Get2() {
return this->value_2;
}
template<typename T> T Get1() {
return value_1;
}
};
Value_1
gives out an error, saying that only static data member templates are allowed. Is there a way to keep value_1
without a type?