src/generics/functions.h

changeset 1322
d8935cdb24c0
parent 1320
bdb4804bc09c
child 1353
48374309f3d1
equal deleted inserted replaced
1321:413d7be6f042 1322:d8935cdb24c0
200 /* 200 /*
201 * Returns a singleton of type T, useful for providing a valid but unused 201 * Returns a singleton of type T, useful for providing a valid but unused
202 * pointer. 202 * pointer.
203 */ 203 */
204 template<typename T> 204 template<typename T>
205 inline T& sink() 205 inline T& singleton()
206 { 206 {
207 static T result; 207 static T result;
208 return result; 208 return result;
209 } 209 }
210 210

mercurial