//===----------------------------------------------------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
// type_traits
// has_nothrow_copy_assign
#include<type_traits>template<classT>voidtest_has_nothrow_assign(){static_assert(std::has_nothrow_copy_assign<T>::value,"");static_assert(!std::has_nothrow_copy_assign<constT>::value,"");static_assert(std::has_nothrow_copy_assign<volatileT>::value,"");static_assert(!std::has_nothrow_copy_assign<constvolatileT>::value,"");}template<classT>voidtest_has_not_nothrow_assign(){static_assert(!std::has_nothrow_copy_assign<T>::value,"");static_assert(!std::has_nothrow_copy_assign<constT>::value,"");static_assert(!std::has_nothrow_copy_assign<volatileT>::value,"");static_assert(!std::has_nothrow_copy_assign<constvolatileT>::value,"");}classEmpty{};classNotEmpty{virtual~NotEmpty();};unionUnion{};structbit_zero{int:0;};classAbstract{virtual~Abstract()=0;};structA{A&operator=(constA&);};intmain(){test_has_not_nothrow_assign<void>();test_has_not_nothrow_assign<A>();test_has_not_nothrow_assign<int&>();test_has_nothrow_assign<Union>();test_has_nothrow_assign<Abstract>();test_has_nothrow_assign<Empty>();test_has_nothrow_assign<int>();test_has_nothrow_assign<double>();test_has_nothrow_assign<int*>();test_has_nothrow_assign<constint*>();test_has_nothrow_assign<char[3]>();test_has_nothrow_assign<char[3]>();test_has_nothrow_assign<NotEmpty>();test_has_nothrow_assign<bit_zero>();}