Closed llvmbot closed 13 years ago
Swap's attempted SFINAE can quite easily trigger access control failures in C++03 mode. Testcase:
using namespace std;
class Private { Private& operator= (const Private&); friend void swap(Private&, Private&); public: Private(); };
void foo () { Private p; swap(p, p); }
Fix Committed revision 136232.
Extended Description
Swap's attempted SFINAE can quite easily trigger access control failures in C++03 mode. Testcase:
include
using namespace std;
class Private { Private& operator= (const Private&); friend void swap(Private&, Private&); public: Private(); };
void foo () { Private p; swap(p, p); }