1 line
22 KiB
C++
1 line
22 KiB
C++
|
//===----------------------------------------------------------------------===//
//
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
// type_traits
// is_explicitly_convertible
#include <type_traits>
typedef void Function();
typedef char Array[1];
int main()
{
{
static_assert(( std::is_explicitly_convertible<void, void>::value), "");
static_assert(( std::is_explicitly_convertible<const void, void>::value), "");
static_assert(( std::is_explicitly_convertible<void, const void>::value), "");
static_assert(( std::is_explicitly_convertible<const void, const void>::value), "");
static_assert((!std::is_explicitly_convertible<void, Function>::value), "");
static_assert((!std::is_explicitly_convertible<const void, Function>::value), "");
static_assert((!std::is_explicitly_convertible<void, Function&>::value), "");
static_assert((!std::is_explicitly_convertible<const void, Function&>::value), "");
static_assert((!std::is_explicitly_convertible<void, Function*>::value), "");
static_assert((!std::is_explicitly_convertible<void, Function* const>::value), "");
static_assert((!std::is_explicitly_convertible<const void, Function*>::value), "");
static_assert((!std::is_explicitly_convertible<const void, Function*const >::value), "");
static_assert((!std::is_explicitly_convertible<void, Array>::value), "");
static_assert((!std::is_explicitly_convertible<void, const Array>::value), "");
static_assert((!std::is_explicitly_convertible<const void, Array>::value), "");
static_assert((!std::is_explicitly_convertible<const void, const Array>::value), "");
static_assert((!std::is_explicitly_convertible<void, Array&>::value), "");
static_assert((!std::is_explicitly_convertible<void, const Array&>::value), "");
static_assert((!std::is_explicitly_convertible<const void, Array&>::value), "");
static_assert((!std::is_explicitly_convertible<const void, const Array&>::value), "");
static_assert((!std::is_explicitly_convertible<void, char>::value), "");
static_assert((!std::is_explicitly_convertible<void, const char>::value), "");
static_assert((!std::is_explicitly_convertible<const void, char>::value), "");
static_assert((!std::is_explicitly_convertible<const void, const char>::value), "");
static_assert((!std::is_explicitly_convertible<void, char&>::value), "");
static_assert((!std::is_explicitly_convertible<void, const char&>::value), "");
static_assert((!std::is_explicitly_convertible<const void, char&>::value), "");
static_assert((!std::is_explicitly_convertible<const void, const char&>::value), "");
static_assert((!std::is_explicitly_convertible<void, char*>::value), "");
static_assert((!std::is_explicitly_convertible<void, const char*>::value), "");
static_assert((!std::is_explicitly_convertible<const void, char*>::value), "");
static_assert((!std::is_explicitly_convertible<const void, const char*>::value), "");
}
{
static_assert((!std::is_explicitly_convertible<Function, void>::value), "");
static_assert((!std::is_explicitly_convertible<Function, const void>::value), "");
static_assert((!std::is_explicitly_convertible<Function, Function>::value), "");
static_assert((!std::is_explicitly_convertible<Function, Function&>::value), "");
static_assert((!std::is_explicitly_convertible<Function, Function&>::value), "");
static_assert(( std::is_explicitly_convertible<Function, Function*>::value), "");
static_assert(( std::is_explicitly_convertible<Function, Function* const>::value), "");
static_assert((!std::is_explicitly_convertible<Function, Array>::value), "");
static_assert((!std::is_explicitly_convertible<Function, const Array>::value), "");
static_assert((!std::is_explicitly_convertible<Function, Array&>::value), "");
static_assert((!std::is_expl
|