llvm / llvm-project

The LLVM Project is a collection of modular and reusable compiler and toolchain technologies.
http://llvm.org
Other
29.39k stars 12.15k forks source link

swap overload can trigger access control failures in C++03 mode #10882

Closed llvmbot closed 13 years ago

llvmbot commented 13 years ago
Bugzilla Link 10510
Resolution FIXED
Resolved on Jul 27, 2011 13:34
Version unspecified
OS Linux
Reporter LLVM Bugzilla Contributor

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); }

llvmbot commented 13 years ago

Fix Committed revision 136232.