Is it not possible to write a small test program to try it out? Brian On Fri, Apr 9, 2010 at 8:53 AM, Borislav Trifonov <bdt@xxxxxxx> wrote: > ----- Original Message ----- > From: Borislav Trifonov <bdt at shaw dot ca> > To: gcc-help at gcc dot gnu dot org > Date: Wed, 31 Mar 2010 23:40:55 -0700 > Subject: shared_ptr implicit cast to bool? > >> 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? > > Hi, I am still hoping someone will help me out here... > > Thanks in advance >