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