[Boost-bugs] [Boost C++ Libraries] #4426: invalid init of reference with gcc 4.5, 4.6 with -std=c++0x

Subject: [Boost-bugs] [Boost C++ Libraries] #4426: invalid init of reference with gcc 4.5, 4.6 with -std=c++0x
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2010-07-12 10:09:03


#4426: invalid init of reference with gcc 4.5, 4.6 with -std=c++0x
-----------------------------+----------------------------------------------
 Reporter: itsme@… | Owner: igaztanaga
     Type: Bugs | Status: new
Milestone: Boost 1.44.0 | Component: interprocess
  Version: Boost 1.44.0 | Severity: Problem
 Keywords: |
-----------------------------+----------------------------------------------
 see #4396 - for the threads library this problem is now solved.

 this code builds fine with msvc2010

 with gcc 4.6 beta i get the same error.

 without the -std=c++0x option it compiles ok

 with boost_1_40_0 and boost_1_39_0 i also get the same error.

 {{{
 echo '#include "boost/interprocess/file_mapping.hpp"' > xinc.cpp
 g++-mp-4.5 -I /opt/local/include/ xinc.cpp -std=c++0x


 In file included from
 /opt/local/include/boost/interprocess/detail/utilities.hpp:25:0,
                  from
 /opt/local/include/boost/interprocess/file_mapping.hpp:19,
                  from xinc.cpp:1:
 /opt/local/include/boost/interprocess/detail/move.hpp: In function
 'typename boost::remove_reference<T>::type&&
 boost::interprocess::move(T&&) [with T =
 boost::interprocess::file_mapping&, typename
 boost::remove_reference<T>::type = boost::interprocess::file_mapping]':
 /opt/local/include/boost/interprocess/file_mapping.hpp:62:55:
 instantiated from here
 /opt/local/include/boost/interprocess/detail/move.hpp:342:11: error:
 invalid initialization of reference of type
 'boost::remove_reference<boost::interprocess::file_mapping&>::type&&' from
 expression of type 'boost::interprocess::file_mapping'

 }}}

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/4426>
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:03 UTC