diff options
| author | Howard Hinnant <hhinnant@apple.com> | 2013-03-26 13:48:57 +0000 |
|---|---|---|
| committer | Howard Hinnant <hhinnant@apple.com> | 2013-03-26 13:48:57 +0000 |
| commit | d9db9f90fbf5218a6edea70e49701bb110ee9180 (patch) | |
| tree | 7c1e33ed7c98ef1f5bf99396a8af6e19c26bb527 /libcxx/test | |
| parent | 2e7d6cd0ec898ac5ff205a2aed096e20ab315cad (diff) | |
| download | bcm5719-llvm-d9db9f90fbf5218a6edea70e49701bb110ee9180.tar.gz bcm5719-llvm-d9db9f90fbf5218a6edea70e49701bb110ee9180.zip | |
Need one more swap overload for swapping two lvalue vector<bool>::reference's.
llvm-svn: 178016
Diffstat (limited to 'libcxx/test')
| -rw-r--r-- | libcxx/test/containers/sequences/vector.bool/swap.pass.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/libcxx/test/containers/sequences/vector.bool/swap.pass.cpp b/libcxx/test/containers/sequences/vector.bool/swap.pass.cpp index 642641ed10d..5d0f0af129e 100644 --- a/libcxx/test/containers/sequences/vector.bool/swap.pass.cpp +++ b/libcxx/test/containers/sequences/vector.bool/swap.pass.cpp @@ -51,4 +51,14 @@ int main() assert(v1.get_allocator() == A(2)); assert(v2.get_allocator() == A(1)); } + { + std::vector<bool> v(2); + std::vector<bool>::reference r1 = v[0]; + std::vector<bool>::reference r2 = v[1]; + r1 = true; + using std::swap; + swap(r1, r2); + assert(v[0] == false); + assert(v[1] == true); + } } |

