//===----------------------------------------------------------------------===// // // The LLVM Compiler Infrastructure // // This file is dual licensed under the MIT and the University of Illinois Open // Source Licenses. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// // #include #if _LIBCPP_STD_VER > 11 namespace ex = std::experimental; struct base_type {}; struct derived_type : base_type {}; int main() { { typedef int T; typedef int U; static_assert(ex::is_same_v, ""); static_assert(std::is_same), const bool>::value, ""); static_assert(ex::is_same_v == std::is_same::value, ""); } { typedef int T; typedef long U; static_assert(!ex::is_same_v, ""); static_assert(ex::is_same_v == std::is_same::value, ""); } { typedef base_type T; typedef derived_type U; static_assert(ex::is_base_of_v, ""); static_assert(std::is_same), const bool>::value, ""); static_assert(ex::is_base_of_v == std::is_base_of::value, ""); } { typedef int T; typedef int U; static_assert(!ex::is_base_of_v, ""); static_assert(ex::is_base_of_v == std::is_base_of::value, ""); } { typedef int T; typedef long U; static_assert(ex::is_convertible_v, ""); static_assert(std::is_same), const bool>::value, ""); static_assert(ex::is_convertible_v == std::is_convertible::value, ""); } { typedef void T; typedef int U; static_assert(!ex::is_convertible_v, ""); static_assert(ex::is_convertible_v == std::is_convertible::value, ""); } } #else /* _LIBCPP_STD_VER <= 11 */ int main() {} #endif /* _LIBCPP_STD_VER > 11 */