git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202587
91177308-0d34-0410-b5e6-
96231b3b80d8
#define LLVM_HAS_RVALUE_REFERENCE_THIS 0
#endif
#define LLVM_HAS_RVALUE_REFERENCE_THIS 0
#endif
-/// \macro LLVM_HAS_CXX11_STDLIB
-/// \brief Does the compiler have the C++11 standard library.
-///
-/// Implies LLVM_HAS_RVALUE_REFERENCES, LLVM_HAS_CXX11_TYPETRAITS
-#define LLVM_HAS_CXX11_STDLIB 1
-
/// \macro LLVM_HAS_VARIADIC_TEMPLATES
/// \brief Does this compiler support variadic templates.
///
/// \macro LLVM_HAS_VARIADIC_TEMPLATES
/// \brief Does this compiler support variadic templates.
///
-#if LLVM_HAS_CXX11_STDLIB
ErrorOr<std::unique_ptr<int> > t3() {
return std::unique_ptr<int>(new int(3));
}
ErrorOr<std::unique_ptr<int> > t3() {
return std::unique_ptr<int>(new int(3));
}
TEST(ErrorOr, Types) {
int x;
TEST(ErrorOr, Types) {
int x;
*a = 42;
EXPECT_EQ(42, x);
*a = 42;
EXPECT_EQ(42, x);
-#if LLVM_HAS_CXX11_STDLIB
// Move only types.
EXPECT_EQ(3, **t3());
// Move only types.
EXPECT_EQ(3, **t3());
ErrorOr<B*> b(ErrorOr<D*>(0));
b = ErrorOr<D*>(0);
ErrorOr<B*> b(ErrorOr<D*>(0));
b = ErrorOr<D*>(0);
-#if LLVM_HAS_CXX11_STDLIB
ErrorOr<std::unique_ptr<B> > b1(ErrorOr<std::unique_ptr<D> >(0));
b1 = ErrorOr<std::unique_ptr<D> >(0);
ErrorOr<std::unique_ptr<B> > b1(ErrorOr<std::unique_ptr<D> >(0));
b1 = ErrorOr<std::unique_ptr<D> >(0);
}
} // end anon namespace
}
} // end anon namespace