Boost logo

Boost :

From: Hubert HOLIN (Hubert.Holin_at_[hidden])
Date: 2001-05-19 17:18:42


Paris (U.E.), le 20/05/2001

--- In boost_at_y..., Gary Powell <Gary.Powell_at_s...> wrote:
> > > #include <boost/filename>
> > >
> > > should be
> > > #include "boost/filename"
> >
> > Well, this is the way it was, but the change to <...> was
> > requested by Jens Maurer during the early phases...
> >
> My understanding is that <> searches the complier's library first, and
> "" searches the users. This suggestion was made to me by B.S. so I'm
> following it, even though my compliers seem to find the right include file
> any way I do it.

        This is my understanding as well. I'll abide by the final
recomandations, whatever they are...

> > > class octonion:
> > > default constructors, and constructors taking one argument, with the
> > rest
> > > default, should be declared "explicit"
> >
> > I disagree in the case of the default constructor. Why would you
> > want them in the other cases you mention?
> >
> In general I have found that its better to not have the compiler generate
> implicit conversions, hence the request that any single argument or default
> argument constructor be declared explicit. But I would be glad to be shown
> an example where this would cause pain for the general user.

        In this case I believe the implicit conversions will not cause
unexpected behaviour: if it occured it is because one was actually
expecting a quaternion (or octonion, resp.). This is an upwards
conversion, with no loss of information. But I agree "explicit" is in
general safer. Again, I'll abide with the final recomandation.

> > I'd rather keep my distance with "swap" until we clearly know
> > where to put it.
> Fine by me. Since it appears that a default swap would do the correct
> thing anyway.
>
> > Unfortunately no, template specializations may be essentially
> > unrelated.
> Dang!
>
> > > At some future time, you might consider using expression templates for
> > > those operators for which it makes sense. (I'm thinking addition and
> > > subtraction)
> >
> > Could you please give more details on that?
> >
> It will take more than one email, but it essential takes
> octonion a, b, c, d;
>
> a = b + c + d;
>
> and generates code which removes the temporaries
> so that instead of doing
>
> t1(b)
> t1 += c;
> t2(t1)
> t2 += d;
> a = t2;
>
> that using an expression template the code would be more like
>
> a.a = b.a + c.a + d.a;
> ....
>
> see PETE at http://www.acl.lanl.gov/pete for a general discussion of
> expression templates.

        I'll read the documentation, but I may not be able to use it
meaningfully before the end of the review period. This does not seem to
be something minor to do. Perhaps for an ulterior evolution?

> > > Also you may want to consider adding your own manipulators for setting
> > the
> > > '(', ')' and ',' delimiters for io. There are some good articles over on
> > the
> > > CUJ expert forum site that tell you how to do this.
> >
> > Any URL welcome...
> >
> Try Matt Austern's article at
>
> http://www.cuj.com/experts
>
> The February 2001 has a discussion on how to do it.

        I'll read it. I would really like to improve the io (especially
for octonions...). Not sure I can do anything sensible before the end
of the review period, but I'll try.

> > If boost delineates namespaces, I will gladly go along with them.
> Some libraries have them, and IMO, most should.

        I'me fully open to any suggestion.

> > Well, once I feel more confortable with swap...
> Probably won't happen. I'm still not comfortable with it.
>
> Thanks again.
> -gary-
>
>
> gary.powell_at_s...

                You're welcome!

                        Hubert Holin
                        Hubert.Holin_at_[hidden]


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