|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r83616 - trunk/libs/type_erasure/test
From: steven_at_[hidden]
Date: 2013-03-27 18:03:38
Author: steven_watanabe
Date: 2013-03-27 18:03:37 EDT (Wed, 27 Mar 2013)
New Revision: 83616
URL: http://svn.boost.org/trac/boost/changeset/83616
Log:
Prevent the move constructor from being elided. This should fix the remaining clang failures in this test case.
Text files modified:
trunk/libs/type_erasure/test/test_construct.cpp | 26 ++++++++++++++++++++++++++
1 files changed, 26 insertions(+), 0 deletions(-)
Modified: trunk/libs/type_erasure/test/test_construct.cpp
==============================================================================
--- trunk/libs/type_erasure/test/test_construct.cpp (original)
+++ trunk/libs/type_erasure/test/test_construct.cpp 2013-03-27 18:03:37 EDT (Wed, 27 Mar 2013)
@@ -252,12 +252,38 @@
}
};
+#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
+
+template<class T>
+struct make_arg_impl<T&&>
+{
+ static T&& apply()
+ {
+ static T result = make_arg_impl<T>::apply();
+ return std::move(result);
+ }
+};
+
+#endif
+
+#ifdef BOOST_NO_CXX11_RVALUE_REFERENCES
+
template<class T>
T make_arg()
{
return make_arg_impl<T>::apply();
}
+#else
+
+template<class T>
+T&& make_arg()
+{
+ return make_arg_impl<T&&>::apply();
+}
+
+#endif
+
int get_value(int i) { return i; }
template<class T>
int get_value(const T& t) { return any_cast<int>(t); }
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk