Opened 10 years ago

Closed 9 years ago

#6949 closed Bugs (wontfix)

bernoulli_distribution not compatible with C++11 standard

Reported by: zhouyan@… Owned by: No-Maintainer
Milestone: To Be Determined Component: random
Version: Boost 1.49.0 Severity: Problem
Keywords: Cc:

Description

The bernoulli_distribution in Boost.Random is a template class with a meaningless template parameter double while it returns always bool as it should be.

The C++11 standard says that bernoulli_distribution shall not be a template class (26.5.8.3.1)

Though it is not really a bug of Boost.Random. However it would be better if it behaves the same as in C++11 since most part of Boost.Random can already be used as a replacement of C++11 <random> when it is not available with the compiler. And library authors use Boost as a reliable fallback when using such C++11 library features

Change History (1)

comment:1 by Steven Watanabe, 9 years ago

Resolution: wontfix
Status: newclosed

I've thought about this for a while, and although I would probably have changed it to match std::bernoulli_distribution if I had caught it when doing the C++11 update for Boost.Random, I don't think it's worth introducing a breaking change for at this point.

Note: See TracTickets for help on using tickets.