int main(int, char**) { test_bullet_one(); test_bullet_two(); test_bullet_three(); return 0; }
int main() { test_bullet_one(); test_bullet_two(); test_bullet_three(); }
int main(int, char**) { static_assert((std::is_same<std::common_type<int>::type, int>::value), ""); static_assert((std::is_same<std::common_type<char>::type, char>::value), ""); #if TEST_STD_VER > 11 static_assert((std::is_same<std::common_type_t<int>, int>::value), ""); static_assert((std::is_same<std::common_type_t<char>, char>::value), ""); #endif static_assert((std::is_same<std::common_type< int>::type, int>::value), ""); static_assert((std::is_same<std::common_type<const int>::type, int>::value), ""); static_assert((std::is_same<std::common_type< volatile int>::type, int>::value), ""); static_assert((std::is_same<std::common_type<const volatile int>::type, int>::value), ""); static_assert((std::is_same<std::common_type<int, int>::type, int>::value), ""); static_assert((std::is_same<std::common_type<int, const int>::type, int>::value), ""); static_assert((std::is_same<std::common_type<long, const int>::type, long>::value), ""); static_assert((std::is_same<std::common_type<const long, int>::type, long>::value), ""); static_assert((std::is_same<std::common_type<long, volatile int>::type, long>::value), ""); static_assert((std::is_same<std::common_type<volatile long, int>::type, long>::value), ""); static_assert((std::is_same<std::common_type<const long, const int>::type, long>::value), ""); static_assert((std::is_same<std::common_type<double, char>::type, double>::value), ""); static_assert((std::is_same<std::common_type<short, char>::type, int>::value), ""); #if TEST_STD_VER > 11 static_assert((std::is_same<std::common_type_t<double, char>, double>::value), ""); static_assert((std::is_same<std::common_type_t<short, char>, int>::value), ""); #endif static_assert((std::is_same<std::common_type<double, char, long long>::type, double>::value), ""); static_assert((std::is_same<std::common_type<unsigned, char, long long>::type, long long>::value), ""); #if TEST_STD_VER > 11 static_assert((std::is_same<std::common_type_t<double, char, long long>, double>::value), ""); static_assert((std::is_same<std::common_type_t<unsigned, char, long long>, long long>::value), ""); #endif static_assert((std::is_same<std::common_type< void>::type, void>::value), ""); static_assert((std::is_same<std::common_type<const void>::type, void>::value), ""); static_assert((std::is_same<std::common_type< volatile void>::type, void>::value), ""); static_assert((std::is_same<std::common_type<const volatile void>::type, void>::value), ""); static_assert((std::is_same<std::common_type<void, const void>::type, void>::value), ""); static_assert((std::is_same<std::common_type<const void, void>::type, void>::value), ""); static_assert((std::is_same<std::common_type<void, volatile void>::type, void>::value), ""); static_assert((std::is_same<std::common_type<volatile void, void>::type, void>::value), ""); static_assert((std::is_same<std::common_type<const void, const void>::type, void>::value), ""); static_assert((std::is_same<std::common_type<int, S<int> >::type, S<int> >::value), ""); static_assert((std::is_same<std::common_type<int, S<int>, S<int> >::type, S<int> >::value), ""); static_assert((std::is_same<std::common_type<int, int, S<int> >::type, S<int> >::value), ""); test_bullet_one(); test_bullet_two(); test_bullet_three_one(); test_bullet_three_two(); test_bullet_four(); // P0548 static_assert((std::is_same<std::common_type<S<int> >::type, S<int> >::value), ""); static_assert((std::is_same<std::common_type<S<int>, S<int> >::type, S<int> >::value), ""); static_assert((std::is_same<std::common_type<int>::type, int>::value), ""); static_assert((std::is_same<std::common_type<const int>::type, int>::value), ""); static_assert((std::is_same<std::common_type<volatile int>::type, int>::value), ""); static_assert((std::is_same<std::common_type<const volatile int>::type, int>::value), ""); static_assert((std::is_same<std::common_type<int, int>::type, int>::value), ""); static_assert((std::is_same<std::common_type<const int, int>::type, int>::value), ""); static_assert((std::is_same<std::common_type<int, const int>::type, int>::value), ""); static_assert((std::is_same<std::common_type<const int, const int>::type, int>::value), ""); #if TEST_STD_VER >= 11 // Test that we're really variadic in C++11 static_assert(std::is_same<std::common_type<int, int, int, int, int, int, int, int>::type, int>::value, ""); #endif return 0; }