boostorg / move

Boost.org move module
http://boost.org/libs/move
Boost Software License 1.0
19 stars 55 forks source link

Add a test for broken move emulation on gcc < 6 #18

Closed bc-lee closed 5 years ago

bc-lee commented 5 years ago

This is an example for broken move emulation on gcc < 6. (Issue #16 )

gcc.compile.c++ ../../bin.v2/libs/move/test/move_noinline.test/gcc-5/debug/move_noinline.o
test/move_noinline.cpp:27:14: error: prototype for 'moveable_v2& moveable_v2::operator=(boost::rv<moveable_v2>&)' does not match any in class 'moveable_v2'
 moveable_v2& moveable_v2::operator=(BOOST_RV_REF(moveable_v2) m)
              ^
test/move_noinline.cpp:18:18: error: candidates are: moveable_v2& moveable_v2::operator=(boost::rv<moveable_v2>&)
     moveable_v2& operator=(BOOST_RV_REF(moveable_v2) m);
                  ^
In file included from test/move_noinline.cpp:1:0:
../../boost/move/core.hpp:38:13: error:                 moveable_v2& moveable_v2::operator=(moveable_v2&)
       TYPE& operator=(TYPE &);\

Tested with gcc 4.9, 5, 6, 7 in Ubuntu 16.04.

codecov[bot] commented 5 years ago

Codecov Report

Merging #18 into develop will not change coverage. The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff            @@
##           develop      #18   +/-   ##
========================================
  Coverage    72.44%   72.44%           
========================================
  Files           28       28           
  Lines         1695     1695           
  Branches       578      578           
========================================
  Hits          1228     1228           
- Misses         106      109    +3     
+ Partials       361      358    -3
Impacted Files Coverage Δ
...ude/boost/move/algo/detail/adaptive_sort_merge.hpp 67.61% <0%> (ø) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 1decc55...e2c7a60. Read the comment docs.

igaztanaga commented 5 years ago

Is this still a problem in Boost 1.69? Problematic MAY_ALIAS attribute was removed for GCC > 4.5.

bc-lee commented 5 years ago

I confirm that this problem is solved in Boost 1.69. Closing.