title: Hiding template implementation details from Doxygen
body: <p>One of the (so very many) unfortunate design flaws of C++ is that it is basically impossible to separate implementation from interface when using template metaprogramming. </p>
  
  <p>All over my library I have things like:</p>
  
  <pre><code>template &lt;typename Ma, typename Mb&gt;
  typename boost::enable_if_c&lt;
              detail::IsMatrix&lt;Ma&gt;::val and detail::IsMatrix&lt;Mb&gt;::val and
              detail::MatrixDimensionCheck&lt;Ma,Mb&gt;::isStaticMatch, 
          bool&gt;::type
  operator==(const Ma &amp;a, const Mb &amp;b) {
      return detail::matrixEqual(a,b);
  }
  </code></pre>
  
  <p>If this is unreadable, I don't blame you. Most of this mess is simply defining the return type to be <code>bool</code> if the arguments are matrices and match dimension, and be undefined if they are something else (thus relying on SFINAE to prevent this operator from hiding other important things). </p>
  
  <p>Since the guts of what is essentially a static type-checking <em>function</em> are now embedded into the signature of my ordinary C++ function, these implementation guts will appear in the generated documentation. </p>
  
  <p>I don't want the user to have to read this. All they need to know is that this function returns a <code>bool</code> (which is almost impossible to tell by reading the above). In the docs, I can explain succinctly, in plain English, that this operator accepts only matrices.</p>
  
  <p>Is there a way to persuade Doxygen to render that type mess as <code>bool</code>? (I'm assuming there is more or less no way to clean this up in the code directly, but ideas are welcome if you can think of something). </p>