[LLVMbugs] [Bug 11113] New: vector::iterator operator+ fails to compile

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue Oct 11 13:35:49 PDT 2011


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

           Summary: vector::iterator operator+ fails to compile
           Product: libc++
           Version: unspecified
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: All Bugs
        AssignedTo: hhinnant at apple.com
        ReportedBy: chris at bubblescope.net
                CC: llvmbugs at cs.uiuc.edu


Created an attachment (id=7442)
 --> (http://llvm.org/bugs/attachment.cgi?id=7442)
patch to iterator

The following code doesn't compile with ToT libc++

#include <vector>

int main(void)
{
  std::vector<int> v;
  1 + v.begin();
}

The problem is that the definitions of operator+ have got out of sync. This
patch fixes it:

Note this is syncing up with the actual definition on line 1296.

This fixes a problem in boost (and probably other things too).

I couldn't see any other similar issues at a quick glance.

-- 
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