Re: [Boost-bugs] [Boost C++ Libraries] #5279: [Foreach] Compile-time const rvalue detection fails with gcc 4.6

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #5279: [Foreach] Compile-time const rvalue detection fails with gcc 4.6
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2011-03-08 17:05:29


#5279: [Foreach] Compile-time const rvalue detection fails with gcc 4.6
--------------------------------------+-------------------------------------
  Reporter: mimomorin@… | Owner: eric_niebler
      Type: Patches | Status: assigned
 Milestone: Boost 1.47.0 | Component: foreach
   Version: Boost Development Trunk | Severity: Problem
Resolution: | Keywords:
--------------------------------------+-------------------------------------

Comment (by mimomorin@…):

 Yeah, with the C++0x features (`-std=c++0x`), we can easily detect
 rvalueness.
 Personally, I use the following code for rvalue detection

 {{{
 #ifndef BOOST_NO_DECLTYPE

 #define BOOST_IS_LVALUE(xxx) boost::is_lvalue_reference<decltype( (xxx)
 )>::value
 #define BOOST_IS_RVALUE(xxx) (!BOOST_IS_LVALUE(xxx))

 #endif
 }}}

 Is it better to develop a method that only needs rvalue reference support
 (i.e. without using the decltype feature)?

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/5279#comment:2>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:05 UTC