<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<
typename MetricType = mlpack::metric::EuclideanDistance,
typename TreeType = mlpack::tree::BinarySpaceTree<bound::HRectBound<2>,
^^^^^^^^^^^^^
tree::EmptyStatistic>
>
class RangeSearch;
</code></pre>
<p>where <code>HRectBound<2></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<class MetricType> class mlpack::bound::HRectBound'
tree::BinarySpaceTree<bound::HRectBound<2>, range::RangeSearchStat> 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<bound::HRectBound<2>, range::RangeSearchStat> 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<2></code> to <code>bound::HRectBound<metric::LMetric<2, true>></code>, then I got the new error:</p>
<pre><code>error: static assertion failed: HRectBound can only be used with the LMetric<> metric type.
static_assert(meta::IsLMetric<MetricType>::Value == true,
</code></pre>
<p>but the MetricType is a LMetric.</p>
<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<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>