Boost logo

Boost Users :

Subject: Re: [Boost-users] boost.uuid typo error
From: Paul A. Bristow (pbristow_at_[hidden])
Date: 2011-11-21 11:59:15


> -----Original Message-----
> From: boost-users-bounces_at_[hidden] [mailto:boost-users-bounces_at_[hidden]] On Behalf
Of
> niXman
> Sent: Monday, November 21, 2011 4:34 PM
> To: boost-users_at_[hidden]
> Subject: [Boost-users] boost.uuid typo error
>
> Hello list!
>
> In the docmantation for boost.uuid on this link:
> http://www.boost.org/doc/libs/1_48_0/libs/uuid/uuid.html#Stream_operators
> in the example of usage boost::lexical_cast<> with boost::uuids::uuid:
> boost::uuids::uuid u1; // initialize uuid
>
> std::string s = boost::lexical_cast<std::string>(u); // <<<<<<<<<<<< must be u1 boost::uuids::uuid
u2 =
> boost::lexical_cast<boost::uuids::uuid>(s);
>
> assert(u1 == u2);
>
> I wish that boost documentation was famous as well as Qt documentation ;)

It's just this sort of 'featurette' that Quickbook snippets allow authors to avoid - by including
only stuff that compiles (and perhaps also runs).

And if you change the source code, the example changes too - without updating the original test..

You can also easily include snippets of the output too.

Paul

---
Paul A. Bristow,
Prizet Farmhouse, Kendal LA8 8AB  UK
+44 1539 561830  07714330204
pbristow_at_[hidden]

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net