title: template for handling user defined type and structure
body: <p>I'm trying to define a template that can handle user defined types and structures. The issue so far is that I can not get information of the structure members through the type definition. The template is suppose to detect structure data type and handle different member types accordingly.</p>
  
  <p>The solution I came up so far involves a vector of type strings that signal the member element count and type:</p>
  
  <pre><code>std::vector&lt;std::string&gt; typeList
  </code></pre>
  
  <p>The program then traverse the list and handle structure according to typeList. There is so far no checking against given structure at all so behavior is undefined if a different structure is passed in.</p>
  
  <p>My question is that is there any elegant way that can achieve this? I'd prefer the solution to check the incoming structure itself to get such type list information instead relying on a second data structure.</p>
  
  <p>Thanks ahead.</p>