Boost logo

Boost :

From: Gary Powell (Gary.Powell_at_[hidden])
Date: 2001-05-18 17:12:09

> > #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.

> > 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.

> 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.

> > 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 += c;
  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 for a general discussion of
expression templates.

> > 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

The February 2001 has a discussion on how to do it.

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

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

  Thanks again.


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