Boost C++ Libraries: Ticket #8894: shared_array cannot be constructed from a null pointer constant https://svn.boost.org/trac10/ticket/8894 <p> I would expect the following to compile: </p> <pre class="wiki">#include &lt;boost/shared_ptr.hpp&gt; #include &lt;boost/shared_array.hpp&gt; int main() { boost::shared_ptr&lt;int&gt; p1(NULL); boost::shared_ptr&lt;int[]&gt; p2(NULL); boost::shared_array&lt;int&gt; p3(NULL); // ERROR #if __cplusplus &gt;= 201103L boost::shared_ptr&lt;int&gt; p4(nullptr); boost::shared_ptr&lt;int[]&gt; p5(nullptr); boost::shared_array&lt;int&gt; p6(nullptr); // ERROR #endif } </pre><p> With Boost 1.47 the shared_array initializations did compile with NULL and nullptr. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/8894 Trac 1.4.3 Peter Dimov Wed, 24 Jul 2013 17:34:50 GMT <link>https://svn.boost.org/trac10/ticket/8894#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/8894#comment:1</guid> <description> <p> The shared_ptr initializations with NULL don't compile for me on a C++03 compiler. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>anonymous</dc:creator> <pubDate>Wed, 24 Jul 2013 17:53:03 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/8894#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/8894#comment:2</guid> <description> <p> Oops, sorry, I didn't actually check it in c++03! </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Peter Dimov</dc:creator> <pubDate>Wed, 11 Dec 2013 23:24:46 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/8894#comment:3 https://svn.boost.org/trac10/ticket/8894#comment:3 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> <p> Fixed in <a class="ext-link" href="https://github.com/boostorg/smart_ptr/commit/a41b81f1c8dde941a14835c5eebe3aaa869ca714"><span class="icon">​</span>https://github.com/boostorg/smart_ptr/commit/a41b81f1c8dde941a14835c5eebe3aaa869ca714</a> </p> Ticket