Boost logo

Boost :

From: Jonathan Turkanis (technews_at_[hidden])
Date: 2004-03-02 03:28:36


<Bjorn.Karlsson_at_[hidden]> wrote in message
news:3D8559AE95B4D611B02C0002557C6C8BA4DB8D_at_STH-EXCH...
> > From: Jonathan Turkanis [mailto:technews_at_[hidden]]
> >
> > Okay, here's a patch for boost/rational.hpp. Please let me know if
> > it's not in a suitable format.
> >
> > Jonathan
>
> Thanks Jonathan,
> It would be even better with a patch for the documentation, too.
Making
> these two typedefs public warrants more than just changing private
to public
> in the code, in my opinion.

You're right.

When I originally posted, in December, I mentioned that the
documentation makes it appear as if all members are private. If the
only change were to 'int_type', the documentation could be fixed by
simply adding 'public:' at the top of the synopsis, since 'int_type'
is self-explanatory. The patch also made 'param_type' public, however.
The definition of param_type, involving call_traits, is not suitable
for inclusion in the synopsis. Rather, the synopsis should look
something like this:

    template<typename I>
    class rational {
    public:
        typedef I int_type;
        typedef [unspecified] param_type;

        ...
    };

With this synopsis, param_type (and probably int_type, for
consistency) should be documented somewhere. A new section 'Associated
Types' should probably be added unter the heading 'Interface'.

I'd be happy to contribute these changes. My thinking was, however,
that they should wait for a new maintainer of the library. What do you
think?

> (Note: Context diffs are preferred [diff -c] - see
> http:://www.boost.org/more/bugs.htm for details.)

Sorry. I couldn't figure out how to pass options to my graphical
client. Time to switch to command-line.

Jonathan


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