Boost logo

Boost Users :

From: Jedediah Smith (jedediah_at_[hidden])
Date: 2005-04-03 05:08:02


I need a type equivelant to rational<int> but supporting two special
values, +inf and -inf which compare greater and less (respectively) to
all other values besides themselves. I don't need to perform any
arithmetic on the inf values so those operations can be undefined.

What is the best strategy for creating such a type? Would it be better
to subclass rational or create an underlying integer type with the inf
values and use rational based on that underlying type? If the former
option, how exactly would I do it?


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net