Boost C++ Libraries: Ticket #8764: Improve traits of Boost.Move https://svn.boost.org/trac10/ticket/8764 <p> Since boost 1.54.0 we have the following traits: </p> <p> has_trivial_move_assign has_trivial_move_constructor is_nothrow_move_assignable is_nothrow_move_constructible </p> <p> It means that <code>has_nothrow_move</code> trait in <code>boost/move/traits.cpp</code> can be improved. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/8764 Trac 1.4.3 Ion Gaztañaga Thu, 01 Aug 2013 15:25:20 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/8764#comment:1 https://svn.boost.org/trac10/ticket/8764#comment:1 <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 revision 85182 </p> Ticket Antony Polukhin Fri, 16 Aug 2013 08:13:54 GMT <link>https://svn.boost.org/trac10/ticket/8764#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/8764#comment:2</guid> <description> <p> I'm afraid that the improved trait breaks one of the tests in <code>libs/move/test/move.hpp</code>. </p> <p> Following assert: </p> <pre class="wiki"> BOOST_STATIC_ASSERT((boost::has_nothrow_move&lt;copyable&gt;::value == false)); </pre><p> will be failing now. According to C++11 Standard <code>is_nothrow_move_constructible</code> evaluates to <code>true</code> if the following code does not throw: </p> <pre class="wiki">copyable var(std::move(nonconst_copyable_variable)) </pre><p> Such code does not throw even if the <code>copyable</code> has no move constructor, but has a nothrow copy constructor. </p> <p> Following solution could be used to fix tests: </p> <pre class="wiki"> // Attempt to move construct `copyable` type won't throw exceptions in C++03 and C++11 BOOST_STATIC_ASSERT((boost::has_nothrow_move&lt;copyable&gt;::value == true)); </pre> </description> <category>Ticket</category> </item> <item> <dc:creator>Ion Gaztañaga</dc:creator> <pubDate>Tue, 20 Aug 2013 18:08:00 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/8764#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/8764#comment:3</guid> <description> <p> I think that would fix the test only for compilers that can deduce it won't throw. I think we should delete that line as we don't know what the compiler will deduce. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Antony Polukhin</dc:creator> <pubDate>Wed, 21 Aug 2013 07:45:56 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/8764#comment:4 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/8764#comment:4</guid> <description> <p> Replying to <a class="ticket" href="https://svn.boost.org/trac10/ticket/8764#comment:3" title="Comment 3">igaztanaga</a>: </p> <blockquote class="citation"> <p> I think that would fix the test only for compilers that can deduce it won't throw. I think we should delete that line as we don't know what the compiler will deduce. </p> </blockquote> <p> I agree. <code>is_nothrow_move_assignable</code> and <code>is_nothrow_move_constructible</code> traits are covered by tests in Boost.<a class="missing wiki">TypeTraits</a>. Test in Boost.Move mainly duplicates those. </p> </description> <category>Ticket</category> </item> </channel> </rss>