//===----------------------------------------------------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
// type_traits
// has_trivial_copy_assign
#include<type_traits>template<classT>voidtest_has_trivial_assign(){static_assert(std::has_trivial_copy_assign<T>::value,"");static_assert(!std::has_trivial_copy_assign<constT>::value,"");static_assert(std::has_trivial_copy_assign<volatileT>::value,"");static_assert(!std::has_trivial_copy_assign<constvolatileT>::value,"");}template<classT>voidtest_has_not_trivial_assign(){static_assert(!std::has_trivial_copy_assign<T>::value,"");static_assert(!std::has_trivial_copy_assign<constT>::value,"");static_assert(!std::has_trivial_copy_assign<volatileT>::value,"");static_assert(!std::has_trivial_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_trivial_assign<void>();test_has_not_trivial_assign<A>();test_has_not_trivial_assign<int&>();test_has_trivial_assign<Union>();test_has_trivial_assign<Abstract>();test_has_trivial_assign<Empty>();test_has_trivial_assign<int>();test_has_trivial_assign<double>();test_has_trivial_assign<int*>();test_has_trivial_assign<constint*>();test_has_trivial_assign<char[3]>();test_has_trivial_assign<char[3]>();test_has_trivial_assign<NotEmpty>();test_has_trivial_assign<bit_zero>();}