type/value mismatch in discrete_distribution.hpp
- Dominant language
- C++
- Stars
- 42
- Forks
- 76
- Avg merge
- 4d 8h
- Merged PRs (30d)
- 5
Description
[This condition](https://github.com/boostorg/random/blob/b8d5df31168a07e04a175ace751f0defa7be5e28/include/boost/random/discrete_distribution.hpp#L603) leads to
```
/usr/include/boost/random/discrete_distribution.hpp:603:32: error: type/value mismatch at argument 1 in template parameter list for ‘template using first = First’
603 | if(a_iter->first < normalized_average) {
| ^~~~~~~~~~~~~~~~~~
/usr/include/boost/random/discrete_distribution.hpp:603:32: note: expected a type, got ‘normalized_average’
```
Substituting with `std::less(a_iter->first, normalized_average)` fixes this issue.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.