Boost logo

Boost :

From: Bruno Lalande (bruno.lalande_at_[hidden])
Date: 2008-02-23 06:13:12


Ouch... looks like a lot of unfortunate copy-pastes were made :-) Sorry for
that, It's fixed now. For the macro, actually it's a user_error policy that
I wanted to use, so I replaced this and left the -1 which is thus OK.

> I'd be inclined to place the synopsis at the top of the file: that way
> those
> already comfortable with the library can just get stuck right in without
> having to re-read the tutorial :-)

OK, and I moved the "header file" section as well since those two sections
must remain tied, I think.

"Joaquín López Muñoz" appears mangled in my version: this might be safer
> encoded using XML escape sequences rather than UTF8?

I've put the whole phrase into a ''' section with escape characters inside
as you can see in the attached file, but the generated HTML page is the same
(still unicode) so I think it won't solve the problem for you (I can't
reproduce it here). I'm not really aware of the possibilities of QuickBook
for escape sequences... the goal would be to have the generated HTML source
itself written in terms of escape sequences for those characters, not only
in the qbk file. I can I do that?

> template <int p, class Unit, class Y>
> inline computed-result-type pow(const quantity<Unit,Y>& u)
> {
> typedef computed-result-type result_type;
> return result_type(boost::math::pow<p>(u.value()));
> }
>
> ????
>

You're right. What I had thought about was actually over-engineered as I
thought it was necessary to have every sub-call returning the right type
(that is, the first product returning an area, then the second one returning
a volume, etc...). I hadn't realized it was possible to just cast the final
resulting double into the right Boost.Units type.

Bruno




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