Boost C++ Libraries: Ticket #1113: shared_array<T> should convert to shared_array<T const> https://svn.boost.org/trac10/ticket/1113 <p> <a class="ext-link" href="http://lists.boost.org/boost-users/2007/05/28330.php"><span class="icon">​</span>http://lists.boost.org/boost-users/2007/05/28330.php</a> </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/1113 Trac 1.4.3 Peter Dimov Sun, 22 Jul 2007 00:04:32 GMT status changed https://svn.boost.org/trac10/ticket/1113#comment:1 https://svn.boost.org/trac10/ticket/1113#comment:1 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">assigned</span> </li> </ul> Ticket Nathan Crookston <nathan.crookston@…> Fri, 24 Apr 2009 17:11:49 GMT attachment set https://svn.boost.org/trac10/ticket/1113 https://svn.boost.org/trac10/ticket/1113 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">shared_array.patch</span> </li> </ul> Ticket Nathan Crookston <nathan.crookston@…> Fri, 24 Apr 2009 17:12:26 GMT attachment set https://svn.boost.org/trac10/ticket/1113 https://svn.boost.org/trac10/ticket/1113 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">simple.cpp</span> </li> </ul> <p> Test code </p> Ticket Nathan Crookston <nathan.crookston@…> Fri, 24 Apr 2009 17:14:32 GMT <link>https://svn.boost.org/trac10/ticket/1113#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/1113#comment:2</guid> <description> <p> This patch seems to fix the problem without allowing polymorphic nonsense. I'd be happy to do further work, formatting, or test code, but I wanted to make sure I was heading in the right direction. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Felix</dc:creator> <pubDate>Mon, 03 Oct 2011 05:02:59 GMT</pubDate> <title>severity changed https://svn.boost.org/trac10/ticket/1113#comment:3 https://svn.boost.org/trac10/ticket/1113#comment:3 <ul> <li><strong>severity</strong> <span class="trac-field-old">Problem</span> → <span class="trac-field-new">Regression</span> </li> </ul> <p> Replying to <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/1113" title="#1113: Feature Requests: shared_array&lt;T&gt; should convert to shared_array&lt;T const&gt; (closed: fixed)">pdimov</a>: </p> <blockquote class="citation"> <p> <a class="ext-link" href="http://lists.boost.org/boost-users/2007/05/28330.php"><span class="icon">​</span>http://lists.boost.org/boost-users/2007/05/28330.php</a> </p> </blockquote> <p> Without the const correctness of the shared_array it is not as viable as it could be for many applications. For example if a member function has "shared_array&lt;const T&gt;" as an argument in order to guarantee that the array of T will not be modified, then if one has a non const shared_array he cannot use this function without some possibly unportable/unsafe workaround. </p> Ticket anonymous Mon, 03 Oct 2011 05:06:12 GMT version set https://svn.boost.org/trac10/ticket/1113#comment:4 https://svn.boost.org/trac10/ticket/1113#comment:4 <ul> <li><strong>version</strong> → <span class="trac-field-new">Boost 1.47.0</span> </li> </ul> Ticket Olaf van der Spek <olafvdspek@…> Thu, 17 Nov 2011 16:50:14 GMT <link>https://svn.boost.org/trac10/ticket/1113#comment:5 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/1113#comment:5</guid> <description> <p> Peter, could you review this issue? </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Peter Dimov</dc:creator> <pubDate>Fri, 02 Nov 2012 17:41:42 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/1113#comment:6 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/1113#comment:6</guid> <description> <p> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/81149" title="Implement shared_ptr&lt;X[]&gt;, weak_ptr&lt;X[]&gt;. Refs #1113.">[81149]</a>) Implement shared_ptr&lt;X[]&gt;, weak_ptr&lt;X[]&gt;. Refs <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/1113" title="#1113: Feature Requests: shared_array&lt;T&gt; should convert to shared_array&lt;T const&gt; (closed: fixed)">#1113</a>. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Peter Dimov</dc:creator> <pubDate>Sat, 10 Nov 2012 00:04:51 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/1113#comment:7 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/1113#comment:7</guid> <description> <p> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/81272" title="Updated shared_array to match shared_ptr. Refs #1113.">[81272]</a>) Updated shared_array to match shared_ptr. Refs <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/1113" title="#1113: Feature Requests: shared_array&lt;T&gt; should convert to shared_array&lt;T const&gt; (closed: fixed)">#1113</a>. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Peter Dimov</dc:creator> <pubDate>Wed, 14 Nov 2012 13:52:16 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/1113#comment:8 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/1113#comment:8</guid> <description> <p> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/81339" title="Merged revision(s) 81149, 81159, 81171, 81174, 81219-81220, ...">[81339]</a>) Merged revision(s) 81149, 81159, 81171, 81174, 81219-81220, 81222-81224, 81226, 81229-81239, 81242, 81253, 81257-81262, 81265-81268, 81271-81272, 81275-81277, 81299-81300 from trunk: Implement shared_ptr&lt;X[]&gt;, weak_ptr&lt;X[]&gt;. Refs <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/1113" title="#1113: Feature Requests: shared_array&lt;T&gt; should convert to shared_array&lt;T const&gt; (closed: fixed)">#1113</a>. ........ Fix shared_ptr&lt;T[]&gt; EDG issues. ........ Disable make_shared&lt;T&gt; overloads when T is Q[]. ........ Add catch(...) clauses to sp_array_test.cpp. ........ Add allocate_shared and make_shared for shared_ptr arrays of runtime size. Fulfills need for allocate_shared_array and make_shared_array. ........ Update Jamfile.v2 to run make_shared array tests and allocate_shared array tests. ........ Fix g++ issues. ........ Add specialization of sp_if_not_array&lt;T[N]&gt;. ........ Rename make_shared.hpp to make_shared_object.hpp, include from make_shared.hpp. ........ Add make_shared_array_args_test.cpp. ........ Add support for make_shared of array of arrays. Correctly destroy elements and construct elements for the variadic template constructor variants. ........ Fix sp_convertible&lt;T const[], T const[]&gt;. ........ Update smart_ptr/detail/array_helper to have create and create_noinit for non-array case. ........ Rename sp_convertible_test.cpp to shared_ptr_convertible_test.cpp. ........ Don't treat array_helper create and create_noinit for array types as a special case. ........ Add sp_convertible_test.cpp. ........ Fix array_helper (create_noinit and use of args...). ........ Update allocate_shared and make_shared to treat multidimensional array as single dimension. Remove detail array_helper. Add detail array traits. Update tests. ........ Simplify array_deleter interface ........ Add missing semicolon. ........ Fix typo. ........ Add tests for variadic template constructors overload of array forms of make_shared and allocate_shared for multidimensional arrays and up to 9 constructor arguments. ........ Add support for shared_ptr&lt;X[N&gt;. ........ Add C++11 initializer list support for make_shared and allocate_shared array forms. </p> <p> ........ Clean up code in allocate_shared_array.hpp and make_shared_array.hpp ........ Change make_shared and allocate_shared array form semantics with initializer lists overload that takes no size. ........ Disable make_shared for arrays when the compiler doesn't support partial specialization or SFINAE. ........ For allocate_shared and make_shared: Separate test case that g++ does support yet. Remove macros testing for no partial specialization in traits. Add additional traits. ........ Actually remove test cases from make_shared_array_create_test.cpp and allocate_shared_array_create_test.cpp that g++ does not handle. ........ Add overloads to support fixed size arrays, T[N], to allocate_shared (variadic) and make_shared (variadic) and make_shared_noinit. ........ Add additional overload for make_shared and allocate_shared for arrays for fixed size arrays and initializer lists. ........ Add assertion to overload of make_shared and allocate_shared for T[N] with initializer lists. Rename detail type to be more intuitive. ........ Add allocate_shared_array_args_test.cpp. ........ Keep old definition of sp_assert_convertible when BOOST_SP_NO_SP_CONVERTIBLE is set. ........ Updated shared_array to match shared_ptr. Refs <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/1113" title="#1113: Feature Requests: shared_array&lt;T&gt; should convert to shared_array&lt;T const&gt; (closed: fixed)">#1113</a>. ........ Add final overload of make_shared and allocate_shared (array forms) for T[][N] with C++11 initializer lists. ........ Change traits for initializer list for g++ ........ Tidy long line formatting in allocate_shared_array.hpp and make_shared_array.hpp ........ Update tests for make_shared and allocate_shared array forms, for normal case, initializer lists, variadic template arguments, for arrays and fixed size arrays. ........ Update Jamfile.v2 with two new smart_ptr tests for allocate_shared and make_shared ........ </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Peter Dimov</dc:creator> <pubDate>Sat, 08 Dec 2012 00:48:10 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/1113#comment:9 https://svn.boost.org/trac10/ticket/1113#comment:9 <ul> <li><strong>status</strong> <span class="trac-field-old">assigned</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> Ticket