Pull in r158245 from upstream clang:
[C++11 Compat] Fix breaking change in C++11 pair copyctor.
While this code is valid C++98, it is not valid C++11. The problem
can be reduced to:
class MDNode;
class DIType {
operator MDNode*() const {return 0;}
};
class WeakVH {
WeakVH(MDNode*) {}
};
int main() {
DIType di;
std::pair<void*, WeakVH> p(std::make_pair((void*)0, di)));
}
This was not detected by any of the bots we have because they either
compile C++98 with libstdc++ (which allows it), or C++11 with libc++
(which incorrectly allows it). I ran into the problem when compiling
with VS 2012 RC.
Thanks to Richard for explaining the issue.
This fixes building clang 3.1 on stable/9 with libc++ in C++11 mode.
This is a direct commit to stable/9, since there is no separate commit
in head which has just this particular change, and I do not want to do a
full import at this time.
Reported by: Marco Bröder <marco.broeder@gmx.eu>
git-svn-id: svn://svn.freebsd.org/base/stable/9@243781
ccf9f872-aa2e-dd11-9fc8-
001c23d0bc1f