
Daryle Walker wrote:
I'm writing a class template where the template parameter is a type that should represent real numbers. It started choking when using boost::rational when I needed Boolean conversion, e.g.
Before anyone says that's proper, realize that boost::rational DOES have "operator not()" defined! This is a surprise to the typical C++ programmer. Either both should be defined, or neither. I think that boost::rational should add a Boolean conversion. (It's a quick fix, and it is critical, so it should be done for this release.)
Off the top of my head, I can't think why it shouldn't be added. However, there might be a good reason I can't think of, and adding the operator could conceivably break existing code, so I don't think it's appropriate to stick it in a few days before release. I'll add it to the list of feature requests for 1.34. In the mean time, maybe you can use != 0 or !! Jonathan