Boost logo

Boost :

From: Andy Little (andy_at_[hidden])
Date: 2004-02-01 18:27:41

"David Abrahams" <dave_at_[hidden]> wrote ...
> "Andy Little" <andy_at_[hidden]> writes:


> > OK I have started on boost::mpl::rational_c.
> > I have derived from that into boost::mpl::integral_rational_c.
> I can't imagine what that would mean or why that would be needed. A
> rational number is by definition both:
> a. Not integral
> b. A ratio of integers.

That was a bait.;-) OK to hack Alexey Gurtovoys rational_c ?
This message has been recorded etc.

> > In implementing that I need some may try Fernando
> > converter. OTOH Alexey Gurtovoys types_promotion_traits if all needs to
> > mpl.
> I think you want Joel de Guzman's technology. You might search the
> message archives for his postings about it.

OK I need this in the library...btw so does mpl impl ! too much ad-hoc
stuff for my likeing :-)


> >>From there I go to int_rational, long_rational etc
> > I prefer int_rat but.... ok forget it :-)
> Overkill, IMO, but it's your party.

I'll make sure I go to bed early . :-)

> > Finally can use that to implement simple pow,root reciprocal etc.
> > Should I do reciprocal<integral_c> --> integral_rational_c or is that a
> > user thing?
> Sorry, I don't understand the question.

sorted by your previous reply.

> MPL metafunctions only deal in types (which may be wrappers for
> numbers). That simplifies everything a lot.

I'm going for naming members xx_value and xx_type.
Any good ?... whats (rolling up my trouser leg) *traditional*.


> > Are there some written guidelines on these conventions or am I just
meant to
> > 'know' them? hmm..I seem to remember asking this before :-)
> Just look back a little bit in the thread to Daniel Wallin's posting
> and I think you'll find the answer you seek.

This ? :

This is not the "traditional" use of trailing underscores. Normally they
are used for keywords.

   int -> int_
   bool -> bool_

etc. MPL uses tons of names that clashes with names in std. This is a
problem for the user, not the library.

Daniel Wallin
Cant see the reference or the link to written guidelines ...?
I do see ... "Dont worry about the user" though !
hmm ...Ok to use the _t suffix then ..."traditional" way to represent a
typedef . Started in the 70's I think ;-)
BTW I declined joining the freemasons ...I prefer things to be open  to
BUT .......... mpl rocks! ..........................  :-)
Andy Little

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