title: check whether a field exists in a struct
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/1005476/how-to-detect-whether-there-is-a-specific-member-variable-in-class">How to detect whether there is a specific member variable in class?</a>  </p>
  </blockquote>
  
  
  
  <p>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:</p>
  
  <pre><code>template&lt;typename PointT&gt;
  void doSomething(PointT point) {
    if (containsField(point, "id")) {
      //do stuff
    }
  }
  </code></pre>
  
  <p>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</p>
  
  <p>any ideas?? </p>