|
Boost Users : |
Subject: Re: [Boost-users] boost::bind and Motif
From: Richard (legalize+jeeves_at_[hidden])
Date: 2012-05-14 17:38:48
[Please do not mail me a copy of your followup]
boost-users_at_[hidden] spake the secret code
<1D97E025367AFB4A8C528590A3715BF4426048_at_archerysummit2.willamette.charteroaks> thusly:
>As for your earlier comment about the only "sane" thing being to cast
I don't think that was me who first remarked about it being the only
sane thing to do, but I agree with the statement.
>back to the exact same type after a void* context parameter, that's the
>main reason why I suggested a generic helper class. My class takes
>complete control of the Xt callback, thus making it extremely difficult
>to mess up that cast, and it provides a type-safe interface to your
>code. Get it working once, and then reuse it whenever you need an
>XtAppTimeout.
Yes, I agree.
Whenever I am writing C++ code that must deal with void* mechanisms,
the first thing I do is shove that void* behind some sort of helper
class or function that quarantines the void* to the smallest scope
possible.
-- "The Direct3D Graphics Pipeline" -- DirectX 9 version available for download <http://legalizeadulthood.wordpress.com/the-direct3d-graphics-pipeline/> Legalize Adulthood! <http://legalizeadulthood.wordpress.com>
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