title: Don't use sizeof for T if T is a function
body: <p>I have near following struct for detecting if type can be passed by value:</p>
  
  <pre><code>template &lt;class T&gt;
  struct should_be_passed_by_value {
      static constexpr bool value = 
          std::is_scalar&lt;T&gt;::value || 
          std::is_array&lt;T&gt;::value || 
          std::is_reference&lt;T&gt;::value || 
          (sizeof(T) &lt;= sizeof(void*));
  };
  </code></pre>
  
  <p>Problem is: when I instantiate it for C-like function pointer or std::function, the compiler says:</p>
  
  <pre><code>invalid application of 'sizeof' to a function type
  </code></pre>
  
  <p>(of course).</p>
  
  <p>How can it be modified so that <code>value</code> will contain <code>false</code>?</p>