[LLVMbugs] [Bug 10510] New: swap overload can trigger access control failures in C++03 mode

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Jul 27 01:46:54 PDT 2011


http://llvm.org/bugs/show_bug.cgi?id=10510

           Summary: swap overload can trigger access control failures in
                    C++03 mode
           Product: libc++
           Version: unspecified
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: All Bugs
        AssignedTo: hhinnant at apple.com
        ReportedBy: scshunt at csclub.uwaterloo.ca
                CC: llvmbugs at cs.uiuc.edu


Swap's attempted SFINAE can quite easily trigger access control failures in
C++03 mode. Testcase:

#include <utility>

using namespace std;

class Private {
  Private& operator= (const Private&);
  friend void swap(Private&, Private&);
public:
  Private();
};

void foo () {
  Private p;
  swap(p, p);
}

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list