[mlpack-git] [mlpack] RangeSearch constructor: address of '<tree object>' will always evaluate to 'true' (#528)

Li Dong notifications at github.com
Sat Feb 27 09:08:52 EST 2016


I am using `RangeSearch` in mlpack 2.0.1 as:
```
typedef metric::EuclideanDistance MetricType;
typedef tree::BinarySpaceTree<MetricType> TreeType;
typedef range::RangeSearch<> SearchType;
...
arma::mat dataset(...);
...
TreeType datasetTree(dataset);
....
SearchType a(&datasetTree, true);
```
The C++ compiler is `g++` 5.2.0, and it print warning as:
```
: warning: address of 'datasetTree' will always evaluate to 'true'
      [-Wpointer-bool-conversion]
    SearchType a(&datasetTree, true);
               ~  ^~~~~~~~~~~
1 warning generated.
```

---
Reply to this email directly or view it on GitHub:
https://github.com/mlpack/mlpack/issues/528
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.cc.gatech.edu/pipermail/mlpack-git/attachments/20160227/6294d78b/attachment-0001.html>


More information about the mlpack-git mailing list