|
Boost : |
Subject: [boost] [uuid] Confusing uuid_class example in documentation
From: Sylvester-Bradley, Gareth (Gareth.Sylvester-Bradley_at_[hidden])
Date: 2010-04-28 03:58:45
http://beta.boost.org/doc/libs/1_42_0/libs/uuid/uuid.html#POD%20Efficien
cies includes some example code for making a uuid_class from the struct
uuid POD.
I was confused to see the example uuid_class both derives from
boost::uuids::uuid *and* provides operator boost::uuids::uuid() [const].
Aren't the conversion operators unnecessary, as a conversion function is
never called to convert an object to a base class of that type (by
12.3.2 [class.conv.fct])?
In fact the source file that the documentation references (e.g. at
https://svn.boost.org/trac/boost/browser/tags/release/Boost_1_43_0_beta1
/libs/uuid/test/test_uuid_class.cpp) doesn't include the conversion
operators. I think the documentation should be updated to match.
Cheers,
Gareth
************************************************************************
The information contained in this message or any of its attachments may be confidential and is intended for the exclusive use of the addressee(s). Any disclosure, reproduction, distribution or other dissemination or use of this communication is strictly prohibited without the express permission of the sender. The views expressed in this email are those of the individual and not necessarily those of Sony or Sony affiliated companies. Sony email is for business use only.
This email and any response may be monitored by Sony to be in compliance with Sony's global policies and standards
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk