title: Default parameter in template -> template argument involves template parameter
body: <p>I have a problem similar to this one: <a href="https://stackoverflow.com/questions/7776448/sfinae-tried-with-bool-gives-compiler-error-template-argument-tvalue-invol">SFINAE tried with bool gives compiler error: &quot;template argument ‘T::value’ involves template parameter&quot;</a></p>
  
  <p>I want to define a trait that tells if a complex representation is an array of structs, where real values are never AoS hence no user defined specilization should be required, but for complex you'd always need one: </p>
  
  <pre><code>/**
   * Evaluates to a true type if the given complex type is an Array of Structs, false otherwise
   * Defaults to false for Real values
   */
  template&lt; typename T, bool T_isComplex = IsComplex&lt;T&gt;::value &gt;
  struct IsAoS: std::false_type{};
  
  /**
   * Undefined for (unknown) complex types
   */
  template&lt; typename T &gt;
  struct IsAoS&lt; T, true &gt;;
  </code></pre>
  
  <p>Specializations are done in the std-way by deriving from std::true/false_type.</p>
  
  <p>The problem is: With this implementation I get the "template argument involves template parameter(s)" error (which is explained in the linked question) but if i switch to types (ommit "::value" in first template and change true to true_type in 2nd) Complex types won't match the 2nd template anymore because the only derive from std::true_type and ARE NOT std::true_type.</p>
  
  <p>Only solution I can think of is using expression SFINAE and change the 2nd parameter of the main template to default void and an enable_if for the real case (isComplex==false). Anything better?</p>