Revert "Update aosp/master libcxx rebase to r263688"

The world is burning.

This reverts commit c004fd909c, reversing
changes made to 1418e4163d.
This commit is contained in:
Dan Albert
2016-05-25 22:36:09 -07:00
parent c004fd909c
commit 1d4a1edbc7
1396 changed files with 11495 additions and 38952 deletions

View File

@@ -8,59 +8,51 @@
//===----------------------------------------------------------------------===//
//
// Test the "test_macros.h" header.
#include <__config>
#include "test_macros.h"
#ifndef TEST_STD_VER
#error TEST_STD_VER must be defined
#endif
#ifndef TEST_DECLTYPE
#error TEST_DECLTYPE must be defined
#endif
#ifndef TEST_NOEXCEPT
#error TEST_NOEXCEPT must be defined
#endif
#ifndef LIBCPP_ASSERT
#error LIBCPP_ASSERT must be defined
#ifndef TEST_STATIC_ASSERT
#error TEST_STATIC_ASSERT must be defined
#endif
#ifndef LIBCPP_STATIC_ASSERT
#error LIBCPP_STATIC_ASSERT must be defined
#endif
template <class T, class U>
struct is_same { enum { value = 0 }; };
template <class T>
struct is_same<T, T> { enum { value = 1 }; };
int foo() { return 0; }
void test_noexcept() TEST_NOEXCEPT
{
}
void test_libcxx_macros()
void test_decltype()
{
// ===== C++14 features =====
// defined(TEST_HAS_EXTENDED_CONSTEXPR) != defined(_LIBCPP_HAS_NO_CXX14_CONSTEXPR)
#ifdef TEST_HAS_EXTENDED_CONSTEXPR
# ifdef _LIBCPP_HAS_NO_CXX14_CONSTEXPR
# error "TEST_EXTENDED_CONSTEXPR mismatch (1)"
# endif
#else
# ifndef _LIBCPP_HAS_NO_CXX14_CONSTEXPR
# error "TEST_EXTENDED_CONSTEXPR mismatch (2)"
# endif
#endif
typedef TEST_DECLTYPE(foo()) MyType;
TEST_STATIC_ASSERT((is_same<MyType, int>::value), "is same");
}
// defined(TEST_HAS_VARIABLE_TEMPLATES) != defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
#ifdef TEST_HAS_VARIABLE_TEMPLATES
# ifdef _LIBCPP_HAS_NO_VARIABLE_TEMPLATES
# error "TEST_VARIABLE_TEMPLATES mismatch (1)"
# endif
#else
# ifndef _LIBCPP_HAS_NO_VARIABLE_TEMPLATES
# error "TEST_VARIABLE_TEMPLATES mismatch (2)"
# endif
#endif
// ===== C++1z features =====
void test_static_assert()
{
TEST_STATIC_ASSERT((is_same<int, int>::value), "is same");
TEST_STATIC_ASSERT((!is_same<int, long>::value), "not same");
}
int main()
{
test_noexcept();
test_libcxx_macros();
test_decltype();
test_static_assert();
}