Modify

Ticket #3804 (closed Feature Requests: fixed)

Opened 4 years ago

Last modified 4 years ago

adapt rvalue references

Reported by: anonymous Owned by: johnmaddock
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)

Attachments

Change History

comment:1 Changed 4 years ago by johnmaddock

  • Status changed from new to assigned

comment:2 Changed 4 years ago by anonymous

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 Changed 4 years ago by johnmaddock

  • Status changed from assigned to closed
  • Resolution set to fixed

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

View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
The resolution will be deleted. Next status will be 'reopened'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.