Boost C++ Libraries: Ticket #5795: is_rvalue_reference returns wrong result when rvalue reference to a function is passed https://svn.boost.org/trac10/ticket/5795 <p> On Visual C++ 10.0. </p> <p> Compile error occured: </p> <pre class="wiki">#include &lt;boost/type_traits/is_rvalue_reference.hpp&gt; static_assert(boost::is_rvalue_reference&lt;void (&amp;&amp;)()&gt;::value == true, ""); int main(){} </pre><p> info: Compile error occured use std::is_rvalue_reference </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/5795 Trac 1.4.3 anonymous Sat, 20 Aug 2011 16:19:02 GMT <link>https://svn.boost.org/trac10/ticket/5795#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/5795#comment:1</guid> <description> <p> I don't see an easy fix for this - it looks like a compiler bug - and std::is_rvalue_reference is implemented in exactly the same way as our trait, and has the same issue :-( </p> <p> BTW we do have a test case for this (tricky_rvalue_test.cpp), and the issue has been reported to the VC++ team. </p> </description> <category>Ticket</category> </item> <item> <author>iorate <iorate_stage@…></author> <pubDate>Sat, 20 Aug 2011 17:41:34 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/5795#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/5795#comment:2</guid> <description> <p> Partial specilizations help solve the problem. </p> <p> For example, the following additional header works well. </p> <p> is_rvalue_reference_patch.hpp (please place this file in the include paths) </p> <pre class="wiki">#ifndef BOOST_PP_IS_ITERATING #ifndef IS_RVALUE_REFERENCE_PATCH_HPP #define IS_RVALUE_REFERENCE_PATCH_HPP #include &lt;boost/mpl/bool.hpp&gt; #include &lt;boost/preprocessor/iteration/iterate.hpp&gt; #include &lt;boost/preprocessor/punctuation/comma_if.hpp&gt; #include &lt;boost/preprocessor/repetition/enum_params.hpp&gt; #include &lt;boost/preprocessor/repetition/enum_trailing_params.hpp&gt; #include &lt;boost/type_traits/is_rvalue_reference.hpp&gt; namespace boost { #define BOOST_PP_ITERATION_PARAMS_1 (3, (0, 25, "is_rvalue_reference_patch.hpp")) #include BOOST_PP_ITERATE() } // namespace boost #endif // IS_RVALUE_REFERENCE_PATCH_HPP #else #define n BOOST_PP_ITERATION() template &lt;class R BOOST_PP_ENUM_TRAILING_PARAMS(n, class A)&gt; struct is_rvalue_reference&lt;R (&amp;&amp;)(BOOST_PP_ENUM_PARAMS(n, A))&gt; : boost::mpl::true_ {}; template &lt;class R BOOST_PP_ENUM_TRAILING_PARAMS(n, class A)&gt; struct is_rvalue_reference&lt;R (&amp;&amp;)(BOOST_PP_ENUM_PARAMS(n, A) BOOST_PP_COMMA_IF(n) ...)&gt; : boost::mpl::true_ {}; #undef n #endif </pre><p> test.cpp </p> <pre class="wiki">#include &lt;boost/static_assert.hpp&gt; #include &lt;boost/type_traits/is_rvalue_reference.hpp&gt; #include "./is_rvalue_reference_patch.hpp" BOOST_STATIC_ASSERT((boost::is_rvalue_reference&lt;int (&amp;&amp;)(int)&gt;::value)); BOOST_STATIC_ASSERT((boost::is_rvalue_reference&lt;int (&amp;&amp;)(int, ...)&gt;::value)); </pre> </description> <category>Ticket</category> </item> <item> <dc:creator>John Maddock</dc:creator> <pubDate>Thu, 02 Aug 2018 10:53:05 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/5795#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/5795#comment:3</guid> <description> <p> Moved to <a class="ext-link" href="https://github.com/boostorg/type_traits/issues/78"><span class="icon">​</span>https://github.com/boostorg/type_traits/issues/78</a> </p> </description> <category>Ticket</category> </item> <item> <dc:creator>John Maddock</dc:creator> <pubDate>Thu, 02 Aug 2018 11:39:47 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/5795#comment:4 https://svn.boost.org/trac10/ticket/5795#comment:4 <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">duplicate</span> </li> </ul> Ticket