[Assorted-commits] SF.net SVN: assorted:[1514] cpp-commons/trunk/src/commons/nullptr.h
Brought to you by:
yangzhang
From: <yan...@us...> - 2009-11-23 07:57:15
|
Revision: 1514 http://assorted.svn.sourceforge.net/assorted/?rev=1514&view=rev Author: yangzhang Date: 2009-11-23 07:57:04 +0000 (Mon, 23 Nov 2009) Log Message: ----------- only use if nullptr not already avail (VS2010) Modified Paths: -------------- cpp-commons/trunk/src/commons/nullptr.h Modified: cpp-commons/trunk/src/commons/nullptr.h =================================================================== --- cpp-commons/trunk/src/commons/nullptr.h 2009-11-20 07:19:26 UTC (rev 1513) +++ cpp-commons/trunk/src/commons/nullptr.h 2009-11-23 07:57:04 UTC (rev 1514) @@ -1,11 +1,15 @@ #ifndef COMMONS_NULLPTR_H #define COMMONS_NULLPTR_H +#include <boost/config.hpp> + // From <http://en.wikibooks.org/wiki/More_C%2B%2B_Idioms/nullptr> namespace commons { +#ifdef BOOST_NO_NULLPTR + const // It is a const object... class nullptr_t { @@ -23,6 +27,8 @@ } nullptr = {}; +#endif + } #endif This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |