I'm attempting to compile the following code with the -std=c++11 flag:
#include <utility>
struct Y
{
Y();
Y(const Y&);
};
int main(void) {
Y y;
std::pair<int, Y> p = std::make_pair(0, y);
return 0;
};
This works fine when compiled with:
CC -std=c++03 -m64 -c
or on Linux (GCC 4.7.3/GCC 4.9) with:
g++ -std=c++11 -m64 -c
However when compiled with:
CC -std=c++11 -m64 -c
It produces the following error:
"pair.cpp", line 11: Error: Using deleted function 'std::pair<int, Y>::pair(std::pair<int, Y>&&)'.
1 Error(s) detected.
I suspect this is a compiler bug, but wanted to confirm there wasn't a clause in the standard that would explain this.