diff options
Diffstat (limited to 'libcxx/test/utilities/utility/pairs/pairs.pair/U_V.pass.cpp')
| -rw-r--r-- | libcxx/test/utilities/utility/pairs/pairs.pair/U_V.pass.cpp | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/libcxx/test/utilities/utility/pairs/pairs.pair/U_V.pass.cpp b/libcxx/test/utilities/utility/pairs/pairs.pair/U_V.pass.cpp new file mode 100644 index 00000000000..c4ecf6ebd10 --- /dev/null +++ b/libcxx/test/utilities/utility/pairs/pairs.pair/U_V.pass.cpp @@ -0,0 +1,30 @@ +//===----------------------------------------------------------------------===// +// +// ΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚThe LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +// <utility> + +// template <class T1, class T2> struct pair + +// template<class U, class V> pair(U&& x, V&& y); + +#include <utility> +#include <memory> +#include <cassert> + +int main() +{ +#ifdef _LIBCPP_MOVE + { + typedef std::pair<std::unique_ptr<int>, short*> P; + P p(std::unique_ptr<int>(new int(3)), nullptr); + assert(*p.first == 3); + assert(p.second == nullptr); + } +#endif +} |

