llvm-mirror/include
Owen Anderson 461ad5951b Fix a subtle issue in SmallVector. The following code did not work as expected:
vec.insert(vec.begin(), vec[3]);
The issue was that vec[3] returns a reference into the vector, which is invalidated when insert() memmove's the elements down to make space.  The method needs to specifically detect and handle this case to correctly match std::vector's semantics.

Thanks to Howard Hinnant for clarifying the correct behavior, and explaining how std::vector solves this problem.

llvm-svn: 134554
2011-07-06 22:36:59 +00:00
..
llvm Fix a subtle issue in SmallVector. The following code did not work as expected: 2011-07-06 22:36:59 +00:00
llvm-c Cast unused parameter to void. 2011-06-04 16:00:19 +00:00