mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-29 14:20:29 +00:00
add a new pop_back_val method which returns the value popped. This is
heretical from a STL standpoint, but is oh-so-useful for things that can't throw exceptions when copied, like, well, everything in LLVM. llvm-svn: 60587
This commit is contained in:
parent
1e7dff35a6
commit
5a1d7ab054
@ -162,6 +162,12 @@ public:
|
||||
End->~T();
|
||||
}
|
||||
|
||||
T pop_back_val() {
|
||||
T Result = back();
|
||||
pop_back();
|
||||
return Result;
|
||||
}
|
||||
|
||||
void clear() {
|
||||
destroy_range(Begin, End);
|
||||
End = Begin;
|
||||
|
Loading…
Reference in New Issue
Block a user