shared_ptr implicit cast to bool?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Is it possible to do a check for null without doing .get() == 0 ?
In MSVC's std::tr1::shared_ptr for example there is a cast operator as part of the class that allows writing
if (mySharedPtr) ...
Will this work in gcc or will I need to modify my code when porting?

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux