Fixed a test that was attempting to use rvalue-references w/o checking to see if they were supported in the language. This resulted in a warning when testing using C++03.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@206482 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Marshall Clow
2014-04-17 18:11:38 +00:00
parent 6601516af8
commit f1d10875d7

View File

@@ -36,6 +36,7 @@ void test_is_not_assignable()
struct D;
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
struct C
{
template <class U>
@@ -46,6 +47,7 @@ struct E
{
C operator=(int);
};
#endif
int main()
{
@@ -54,9 +56,10 @@ int main()
test_is_assignable<int&, double> ();
test_is_assignable<B, A> ();
test_is_assignable<void*&, void*> ();
test_is_assignable<E, int> ();
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
test_is_assignable<E, int> ();
test_is_not_assignable<int, int&> ();
test_is_not_assignable<int, int> ();
#endif