title: Template struct specialization for integral/real types
body: <p>I want to create validators for numbers of different kinds (integer ,floating points) e.g.:</p>
  
  <pre><code>typename number_validator&lt;T&gt;::type validator;
  </code></pre>
  
  <p>I found useful traits in the <code>std</code> i.e. <code>is_integral</code> and <code>is_floating_point</code>. How can I use those traits to specialize the template <code>number_validator</code> (it's a <code>struct</code>) ?</p>
  
  <p>edit:
  I'm looking for something like this:</p>
  
  <pre><code>template&lt;typename T, typename Enabled&gt;
  struct number_validator {};
  
  template&lt;typename T&gt;
  struct number_validator&lt;T, typename enable_if&lt;is_floating_point&lt;T&gt;::value, T&gt;::type&gt; 
  //this doesn't work..
  {
      typedef floating_point_validator type;
  };
  </code></pre>