1//===----------------------------------------------------------------------===// 2// 3// The LLVM Compiler Infrastructure 4// 5// This file is dual licensed under the MIT and the University of Illinois Open 6// Source Licenses. See LICENSE.TXT for details. 7// 8//===----------------------------------------------------------------------===// 9 10// <memory> 11 12// unique_ptr 13 14// Test unique_ptr converting move assignment 15 16// Do not convert from an array unique_ptr 17 18#include <memory> 19#include <utility> 20#include <cassert> 21 22struct A 23{ 24}; 25 26struct Deleter 27{ 28 void operator()(void*) {} 29}; 30 31int main() 32{ 33 std::unique_ptr<A[], Deleter> s; 34 std::unique_ptr<A, Deleter> s2; 35 s2 = std::move(s); 36} 37