I\'m trying to get the following C++ code running:
#include
template class ConditionalData {
};
template
you can define setData
for both branches, empty one for false
condition:
template class ConditionalData {
};
template class ConditionalData {
void setData(T _data) {}
};
template class ConditionalData {
private:
T data;
public:
void setData(T _data) { data = _data; }
};
template class A {
public:
A() {
ConditionalData data;
data.setData(3);
}
};