Boost logo

Boost :

From: SourceForge.net (noreply_at_[hidden])
Date: 2005-07-17 15:15:29


Bugs item #1239906, was opened at 2005-07-17 16:15
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=107586&aid=1239906&group_id=7586

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Daryle L. Walker (dlwalker)
Assigned to: Nobody/Anonymous (nobody)
Summary: no Boolean conversion for boost::rational

Initial Comment:
The boost::rational class template, in header file <boost/
rational.hpp>, does not support conversion to a Boolean value. It
does have an "operator !" defined, though. It is a surprise for a type
to have one of these operations but not the other. Currently code
like "if ( !r )" works but not "if ( r )", which should be expected. A
solution is to add a conversion operator to a type that can be used in
Boolean contexts, but as little else as possible. A suggestion is to
use a pointer-to-member (to data or function) type that is unique to
each version of boost::rational, where the exact values are private.

----------------------------------------------------------------------

You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=107586&aid=1239906&group_id=7586

-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Boost-bugs mailing list
Boost-bugs_at_[hidden]
https://lists.sourceforge.net/lists/listinfo/boost-bugs


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk