Possible Duplicate:
How to detect whether there is a specific member variable in class?
I have a templated function that takes a struct as a parameter. If the struct contains the field "id" the function may continue, something like:
template<typename PointT>
void doSomething(PointT point) {
if (containsField(point, "id")) {
//do stuff
}
}
I'm aware of specialization, unfortunatly PointT can be any type that has field id I believe I saw something similar in boost a while ao but can't find it anymore
any ideas??