summaryrefslogtreecommitdiffstats
path: root/libcxx/test/utilities/function.objects/refwrap/refwrap.assign
diff options
context:
space:
mode:
authorEric Fiselier <eric@efcs.ca>2014-12-20 01:40:03 +0000
committerEric Fiselier <eric@efcs.ca>2014-12-20 01:40:03 +0000
commit5a83710e371fe68a06e6e3876c6a2c8b820a8976 (patch)
treeafde4c82ad6704681781c5cd49baa3fbd05c85db /libcxx/test/utilities/function.objects/refwrap/refwrap.assign
parentf11e8eab527fba316c64112f6e05de1a79693a3e (diff)
downloadbcm5719-llvm-5a83710e371fe68a06e6e3876c6a2c8b820a8976.tar.gz
bcm5719-llvm-5a83710e371fe68a06e6e3876c6a2c8b820a8976.zip
Move test into test/std subdirectory.
llvm-svn: 224658
Diffstat (limited to 'libcxx/test/utilities/function.objects/refwrap/refwrap.assign')
-rw-r--r--libcxx/test/utilities/function.objects/refwrap/refwrap.assign/copy_assign.pass.cpp58
1 files changed, 0 insertions, 58 deletions
diff --git a/libcxx/test/utilities/function.objects/refwrap/refwrap.assign/copy_assign.pass.cpp b/libcxx/test/utilities/function.objects/refwrap/refwrap.assign/copy_assign.pass.cpp
deleted file mode 100644
index 122716a23a8..00000000000
--- a/libcxx/test/utilities/function.objects/refwrap/refwrap.assign/copy_assign.pass.cpp
+++ /dev/null
@@ -1,58 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is dual licensed under the MIT and the University of Illinois Open
-// Source Licenses. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-// <functional>
-
-// reference_wrapper
-
-// reference_wrapper& operator=(const reference_wrapper<T>& x);
-
-#include <functional>
-#include <cassert>
-
-class functor1
- : public std::unary_function<int, char>
-{
-};
-
-template <class T>
-void
-test(T& t)
-{
- std::reference_wrapper<T> r(t);
- T t2 = t;
- std::reference_wrapper<T> r2(t2);
- r2 = r;
- assert(&r2.get() == &t);
-}
-
-void f() {}
-void g() {}
-
-void
-test_function()
-{
- std::reference_wrapper<void ()> r(f);
- std::reference_wrapper<void ()> r2(g);
- r2 = r;
- assert(&r2.get() == &f);
-}
-
-int main()
-{
- void (*fp)() = f;
- test(fp);
- test_function();
- functor1 f1;
- test(f1);
- int i = 0;
- test(i);
- const int j = 0;
- test(j);
-}
OpenPOWER on IntegriCloud