13 Jan
2008
13 Jan
'08
3:04 p.m.
On Sun, Jan 13, 2008 at 08:40:51AM -0600, sj@sjcomp.com wrote:
I'd like to provide a function with an unique identifier:
Why? What is it going to do with the ID? Why not make the ID a void* pointer? And what semantics does this "unique identification" have? Once an object is deleted, another new'd object may get its address; I can hardly qualify that as "unique ID".
I guess another question is: should I bother replacing this old-style cast, maybe there is a better way to approach this situation in general?
reinterpret_cast. although, that's long and painful to type at every function
invocation (so is the old-style cast), so I'd redefine f() as
void f(void *pv)
{
size_t uid = reinterpret_cast