
28 Feb
2009
28 Feb
'09
3:41 p.m.
Hello, at least with VS2005 there is a bug in the three smart pointers... If you want to check if the pointer is empty (with unspecified bool) then you get also with NULL a true back. For this the following fix should work: #if defined( _MANAGED ) static void unspecified_bool( this_type*** ) { } typedef void (*unspecified_bool_type)( this_type*** ); operator unspecified_bool_type() const // never throws { return px == 0? 0: unspecified_bool; } #else .... #endif Best regards Hansjörg