summaryrefslogtreecommitdiff
path: root/test/Other
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2014-06-09 22:26:20 +0000
committerDavid Blaikie <dblaikie@gmail.com>2014-06-09 22:26:20 +0000
commit78b4fd3a4b55d7f8b95fb56b5b4f76c83e369ae1 (patch)
tree01789910a929f80da6375b3dda1560e59982ff3c /test/Other
parent8e38e862667e89ac928b8f5e7ce0a91c84fae4bc (diff)
downloadllvm-78b4fd3a4b55d7f8b95fb56b5b4f76c83e369ae1.tar.gz
llvm-78b4fd3a4b55d7f8b95fb56b5b4f76c83e369ae1.tar.bz2
llvm-78b4fd3a4b55d7f8b95fb56b5b4f76c83e369ae1.tar.xz
SmallVector: support resize(N) with move-only types
Unfortunately there's no way to elegantly do this with pre-canned algorithms. Using a generating iterator doesn't work because you default construct for each element, then move construct into the actual slot (bad for copy but non-movable types, and a little unneeded overhead even in the move-only case), so just write it out manually. This solution isn't exception safe (if one of the element's ctors calls we don't fall back, destroy the constructed elements, and throw on - which std::uninitialized_fill does do) but SmallVector (and LLVM) isn't exception safe anyway. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210495 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Other')
0 files changed, 0 insertions, 0 deletions