[Support] Make test C++03.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173004 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Michael J. Spencer 2013-01-21 05:39:07 +00:00
parent c61aa59bcc
commit 7babd25ae4

View File

@ -56,15 +56,14 @@ struct InvalidArgError {
std::string ArgName;
};
#if LLVM_HAS_CXX11_STDLIB
namespace llvm {
template<>
struct ErrorOrUserDataTraits<InvalidArgError> : std::true_type {
struct ErrorOrUserDataTraits<InvalidArgError> : true_type {
static error_code error() {
return make_error_code(errc::invalid_argument);
}
};
} // end namespace lld
} // end namespace llvm
ErrorOr<int> t4() {
return InvalidArgError("adena");
@ -77,4 +76,3 @@ TEST(ErrorOr, UserErrorData) {
EXPECT_EQ("adena", t4().getError<InvalidArgError>().ArgName);
}
} // end anon namespace
#endif