[Halld-offline] Fwd: r11767 - trunk/sim-recon/src/external/xstream/include/xstream
Richard Jones
richard.t.jones at uconn.edu
Wed Oct 23 11:55:03 EDT 2013
Hello Dave,
Good call, you are right. The compiler is not ignoring it. The only
reason g++ may not be flagging it is that xstream::digest::stream::reset()
is a templated class and so the code within is only being generated and
compiled on an as-needed basis. As long as nobody actually invokes the
reset method on a generated class of this type, no code is actually being
generated for this method, and it does not get flagged.
For example, check out the simple program attached (t.h, t.c) and compile
it with g++ first without the violator() line enabled in t.c, and then with
the comment slashes removed. Observe the difference. I am running g++ v
4.4.7.
-Richard Jones
On Wed, Oct 23, 2013 at 11:14 AM, <Hall-D.SVN.Repository at jlab.org> wrote:
> Author: davidl
> Date: 2013-10-23 11:14:40 -0400 (Wed, 23 Oct 2013)
> New Revision: 11767
>
> Modified:
> trunk/sim-recon/src/external/xstream/include/xstream/digest.h
> Log:
> Made sync() method of xstream::digest::stream protected instead of private.
> The clang compiler gave an error when compiling the xstream::digest::common
> class method reset() which called sync(). I'm not sure why this has not
> been
> an issue before since it seems calling a private member of a base class is
> is a textbook violation of the use of "private". Note that this did not
> give
> a compile time error when using g++. Both are default compilers on Mac OS X
> 10.7.5.
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.jlab.org/pipermail/halld-offline/attachments/20131023/3321b860/attachment-0002.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: t.h
Type: text/x-chdr
Size: 133 bytes
Desc: not available
URL: <https://mailman.jlab.org/pipermail/halld-offline/attachments/20131023/3321b860/attachment-0004.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: t.c
Type: text/x-csrc
Size: 82 bytes
Desc: not available
URL: <https://mailman.jlab.org/pipermail/halld-offline/attachments/20131023/3321b860/attachment-0005.bin>
More information about the Halld-offline
mailing list