Opened 13 years ago

Closed 12 years ago

#3804 closed Feature Requests (fixed)

adapt rvalue references

Reported by: anonymous Owned by: John Maddock
Milestone: Boost 1.43.0 Component: type_traits
Version: Boost Development Trunk Severity: Problem
Keywords: Cc:

Description

Boost.TypeTraits, in particular the reference modification metafunctions, does not support rvalue references.

this assert fails with gcc 4.4/-std=c++0x: static_assert(std::is_same<boost::remove_reference<int&&>::type,int>::value,"");

In my opinion, add_lvalue_reference and add_rvalue_reference should be added to keep Boost.TypeTraits conform to c++0x's type traits library (n3000/20.6)

Change History (3)

comment:1 by John Maddock, 13 years ago

Status: newassigned

comment:2 by anonymous, 12 years ago

This piece of code fails on VC10 as well:

#include <boost/type_traits/remove_const.hpp> int main() {

boost::remove_const<int&&>::type c;

}

remove_const.hpp(52): error C2528: 'abstract declarator' : pointer to reference is illegal ...

comment:3 by John Maddock, 12 years ago

Resolution: fixed
Status: assignedclosed

(In [63487]) Update docs to match code. Update type_traits.hpp. Completes fix for #3804. Fixes #3804.

Note: See TracTickets for help on using tickets.