Created attachment 27657 [details]
In certain conditions if the definition of the ctor separated from its declaration it generates an compiler error.
I created a minimal example. The original code is from Boost.Move.
testfull.cpp:16:1: error: prototype for ‘movable::movable(rv<movable>&)’ does not match any in class ‘movable’
testfull.cpp:5:7: error: candidates are: movable::movable(const movable&)
testfull.cpp:13:5: error: movable::movable(rv<movable>&)
If the ctor definition is inside the class the code compiles.
The same can happen with the assignment operator as visible here:
The candidate list also includes the implicitly-declared copy ctor (and in c++11 mode the move ctor) which is also wrong because no definition can be provided for an implicitly-declared special member function.
Related to PR49377
Fixed in GCC 6.1.0