title: Call appropriate constructor depending on value_type : integer or float
body: <p>I have a function which fills a container with random values between min and max using uniform distribution.</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;random&gt;
  #include &lt;algorithm&gt;
  #include &lt;vector&gt;
  
  template&lt;typename TContainer&gt;
  void uniform_random(TContainer&amp; container, 
  const typename TContainer::value_type min, 
  const typename TContainer::value_type max) {
      std::random_device rd;
      std::mt19937 gen(rd());
  
      // Below line does not work with integers container
      std::uniform_real_distribution&lt;typename TContainer::value_type&gt; distribution(min, max);
  
      auto lambda_norm_dist = [&amp;](){ return distribution(gen); };
      std::generate(container.begin(), container.end(), lambda_norm_dist);
  }
  
  int main() {
      std::vector&lt;float&gt; a(10);
      uniform_random(a,0,10);
      for (auto el : a) { std::cout &lt;&lt; el &lt;&lt; " "; }
  }
  </code></pre>
  
  <p>Replacing <code>std::vector&lt;float&gt;</code> with <code>std::vector&lt;int&gt;</code> does not work since I would have to use <code>std::uniform_int_distribution</code> instead.
  Is there a simple and elegant way to pick the right constructor depending on the value_type parameter ?</p>
  
  <p>I was trying so far to use <code>std::numeric_limits&lt;typename TContainer::value_type&gt;::is_integer</code> without success.</p>