Date: Fri, 18 Jun 2004 16:17:57 GMT
Take the following:
const int& plain = GiveMeInt();
//Time goes by
I know that there's nothing wrong with the above because the reference has
extended the life of the variable.
But take the following:
int cow = 343;
const int& ref = GiveMeIntRef();
//Time goes by
Has the lifetime been extended in the above?? Or am I accessing a variable
that no longer exists? If so, should I take the following as a general
guidline: Only return a reference from a function if it was declared via
- Re: [PATCH] Make futex waiters take an mm or inode reference
... Make futex waiters take an mm or inode reference ... Rusty Russell wrote: ... +static inline void drop_key_refs ... -static int futex_wake ...
- Re: dynamic type checking - a pauline conversion?
... it depends on the type of reference to the object. ... In Smalltalk the reference doesn't have a type but the instance does ... and C++ can not guarantee type correctness at compile ...
- Re: Simplicity
... > ByRef (by reference) ... > Dim k as Zone ... property int Value; ... Microsoft C/C++ Optimizing Compiler Version 14.00.40809 ...
- Re: [RESEND PATCH] futex: fix key reference counter in case of requeue.
... reference for the futex_wait operation. ... Process P calls futex_wait() on futex identified by 'key1'. ... static inline int futex(int *uaddr, int op, int val, ... int shmid, ret, *f, n; ...
- Re: hash two keys to one index
... What goes into the map are pairs of (reference to key, ... When I insert an object into the hash table, I pass in ... void insert(Object obj, int hash) throws HashTableFull ... int probe = 0; ...