<p>The documentation (<a href="http://www.mlpack.org/doxygen.php?doc=rstutorial.html">http://www.mlpack.org/doxygen.php?doc=rstutorial.html</a>) says</p>

<pre><code>template&lt;
  typename MetricType = mlpack::metric::EuclideanDistance,
  typename TreeType = mlpack::tree::BinarySpaceTree&lt;bound::HRectBound&lt;2&gt;,
                                                           ^^^^^^^^^^^^^
                                                    tree::EmptyStatistic&gt;
&gt;
class RangeSearch;
</code></pre>

<p>where <code>HRectBound&lt;2&gt;</code> is not valid anymore, <code>g++</code> (5.2.0) complains:</p>

<pre><code>error: type/value mismatch at argument 1 in template parameter list for 'template&lt;class MetricType&gt; class mlpack::bound::HRectBound'
     tree::BinarySpaceTree&lt;bound::HRectBound&lt;2&gt;, range::RangeSearchStat&gt; datasetTree(dataset);
                                              ^
/Users/dongli/Dropbox/Works/CxxExamples/src/UseLibraries/MLPACK/mlpack_exam03.cpp:56:46: note:   expected a type, got '2'
/Users/dongli/Dropbox/Works/CxxExamples/src/UseLibraries/MLPACK/mlpack_exam03.cpp:56:71: error: template argument 1 is invalid
     tree::BinarySpaceTree&lt;bound::HRectBound&lt;2&gt;, range::RangeSearchStat&gt; datasetTree(dataset);

</code></pre>

<p>after read the code <code>mlpack/core/tree/hrectbound.hpp</code>, I found <code>HRectBound</code> needs <code>MetricType</code> template argument. So I changed <code>bound::HRectBound&lt;2&gt;</code> to <code>bound::HRectBound&lt;metric::LMetric&lt;2, true&gt;&gt;</code>, then I got the new error:</p>

<pre><code>error: static assertion failed: HRectBound can only be used with the LMetric&lt;&gt; metric type.
   static_assert(meta::IsLMetric&lt;MetricType&gt;::Value == true,
</code></pre>

<p>but the MetricType is a LMetric.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">&mdash;<br>Reply to this email directly or <a href="https://github.com/mlpack/mlpack/issues/525">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AJ4bFIkXRpqkHOBcniIMvAn3e7X5VOEBks5pnpS9gaJpZM4HidHM.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
  <link itemprop="url" href="https://github.com/mlpack/mlpack/issues/525"></link>
  <meta itemprop="name" content="View Issue"></meta>
</div>
<meta itemprop="description" content="View this Issue on GitHub"></meta>
</div>