Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r80830 - in trunk/libs/thread/test/threads: container thread/constr
From: vicente.botet_at_[hidden]
Date: 2012-10-03 14:47:55


Author: viboes
Date: 2012-10-03 14:47:53 EDT (Wed, 03 Oct 2012)
New Revision: 80830
URL: http://svn.boost.org/trac/boost/changeset/80830

Log:
Thread: Added static assert to catch bug with gcc-4.4
Text files modified:
   trunk/libs/thread/test/threads/container/thread_vector_pass.cpp | 3 +++
   trunk/libs/thread/test/threads/thread/constr/Frvalue_pass.cpp | 3 +++
   2 files changed, 6 insertions(+), 0 deletions(-)

Modified: trunk/libs/thread/test/threads/container/thread_vector_pass.cpp
==============================================================================
--- trunk/libs/thread/test/threads/container/thread_vector_pass.cpp (original)
+++ trunk/libs/thread/test/threads/container/thread_vector_pass.cpp 2012-10-03 14:47:53 EDT (Wed, 03 Oct 2012)
@@ -10,6 +10,7 @@
 #include <boost/container/vector.hpp>
 #include <iostream>
 #include <boost/detail/lightweight_test.hpp>
+#include <boost/static_assert.hpp>
 
 int count = 0;
 boost::mutex mutex;
@@ -41,6 +42,8 @@
   std::cout << "count = " << ++count << std::endl;
 }
 
+BOOST_STATIC_ASSERT(::boost::is_function<boost::rv<boost::rv<boost::thread> >&>::value==false);
+
 int main()
 {
   typedef boost::container::vector<boost::thread> thread_vector;

Modified: trunk/libs/thread/test/threads/thread/constr/Frvalue_pass.cpp
==============================================================================
--- trunk/libs/thread/test/threads/thread/constr/Frvalue_pass.cpp (original)
+++ trunk/libs/thread/test/threads/thread/constr/Frvalue_pass.cpp 2012-10-03 14:47:53 EDT (Wed, 03 Oct 2012)
@@ -24,6 +24,7 @@
 #include <cstdlib>
 #include <cassert>
 #include <boost/detail/lightweight_test.hpp>
+#include <boost/static_assert.hpp>
 
 class MoveOnly
 {
@@ -44,6 +45,8 @@
   return BOOST_THREAD_MAKE_RV_REF(MoveOnly());
 }
 
+BOOST_STATIC_ASSERT(::boost::is_function<boost::rv<boost::rv<MoveOnly> >&>::value==false);
+
 int main()
 {
   {


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