id,summary,reporter,owner,description,type,status,milestone,component,version,severity,resolution,keywords,cc 5098,[result_of] decltype-based result_of cannot handle rvalue-reference correctly,mimomorin@…,Daniel Walker,"The implementation of decltype-based boost::result_of is essentially the same as {{{ // This code is taken from N1454 (author: Douglas Gregor) template class result_of { static F f; static T1 t1; static T2 t2; . . . static TN tN; public: // Note: even if Ti is rvalue reference, ti is treated as lvalue. typedef decltype(f(t1, t2, ..., tN)) type; }; }}} So, the implementation cannot handle rvalue-reference correctly (it becomes lvalue). For example, in the following code {{{ struct func { unsigned char operator()(int&& ) { return 0; } signed char operator()(int& ) { return 0; } char operator()(int const&) { return 0; } }; }}} `boost::result_of::type` is `signed char` (which should be `unsigned char`). I will attach a patch for fixing this issue. The patch uses `declval` rather than static members. ",Patches,closed,To Be Determined,utility,Boost Development Trunk,Problem,fixed,result_of decltype,