Boost logo

Boost :

From: Rob Stewart (stewart_at_[hidden])
Date: 2005-01-11 14:19:02

From: Martin <adrianm_at_[hidden]>
> > Your decimal64 is both an interface *and* an implementation. I just
> > suggest to separate it. Let basic_decimal take care of the interface,
> > while decimal64 takes care of the implementation.
> I can agree that the interface could be formally specified as a basic_decimal
> but still don't understand the benefits of a decimal_traits vs a class that
> implements the basic_decimal interface.

basic_decimal can utilize fundamental operations from the traits
class to provide the full interface. Put another way, the traits
class needn't provide the entire interface that basic_decimal
provides, so adapting a new type to fulfill the basic_decimal
interface is easier. (That's theoretical, of course. I haven't
any idea how much logic Daniel's basic_decimal implements beyond
that provided by his traits class.)

Rob Stewart                           stewart_at_[hidden]
Software Engineer           
Susquehanna International Group, LLP  using std::disclaimer;

Boost list run by bdawes at, gregod at, cpdaniel at, john at