Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r86543 - trunk/libs/thread/test/sync/mutual_exclusion/sync_queue
From: vicente.botet_at_[hidden]
Date: 2013-11-02 05:56:20


Author: viboes
Date: 2013-11-02 05:56:20 EDT (Sat, 02 Nov 2013)
New Revision: 86543
URL: http://svn.boost.org/trac/boost/changeset/86543

Log:
Thread: try to avoid compile error with msvc.12 or atleast remove warning C4512.

Text files modified:
   trunk/libs/thread/test/sync/mutual_exclusion/sync_queue/multi_thread_pass.cpp | 28 ++++++++++++++--------------
   1 files changed, 14 insertions(+), 14 deletions(-)

Modified: trunk/libs/thread/test/sync/mutual_exclusion/sync_queue/multi_thread_pass.cpp
==============================================================================
--- trunk/libs/thread/test/sync/mutual_exclusion/sync_queue/multi_thread_pass.cpp Sat Nov 2 05:54:13 2013 (r86542)
+++ trunk/libs/thread/test/sync/mutual_exclusion/sync_queue/multi_thread_pass.cpp 2013-11-02 05:56:20 EDT (Sat, 02 Nov 2013) (r86543)
@@ -24,36 +24,36 @@
 
 struct call_push
 {
- boost::sync_queue<int> &q_;
- boost::barrier& go_;
+ boost::sync_queue<int> *q_;
+ boost::barrier *go_;
 
- call_push(boost::sync_queue<int> &q, boost::barrier &go) :
+ call_push(boost::sync_queue<int> *q, boost::barrier *go) :
     q_(q), go_(go)
   {
   }
   typedef void result_type;
   void operator()()
   {
- go_.count_down_and_wait();
- q_.push(42);
+ go_->count_down_and_wait();
+ q_->push(42);
 
   }
 };
 
 struct call_pull
 {
- boost::sync_queue<int> &q_;
- boost::barrier& go_;
+ boost::sync_queue<int> *q_;
+ boost::barrier *go_;
 
- call_pull(boost::sync_queue<int> &q, boost::barrier &go) :
+ call_pull(boost::sync_queue<int> *q, boost::barrier *go) :
     q_(q), go_(go)
   {
   }
   typedef int result_type;
   int operator()()
   {
- go_.count_down_and_wait();
- return q_.pull();
+ go_->count_down_and_wait();
+ return q_->pull();
   }
 };
 
@@ -76,7 +76,7 @@
           q.push(42);
         }
 #else
- call_push(q,go)
+ call_push(&q,&go)
 #endif
     );
     pull_done=boost::async(boost::launch::async,
@@ -87,7 +87,7 @@
           return q.pull();
         }
 #else
- call_pull(q,go)
+ call_pull(&q,&go)
 #endif
     );
 
@@ -119,7 +119,7 @@
           q.push(42);
         }
 #else
- call_push(q,go)
+ call_push(&q,&go)
 #endif
     );
 
@@ -160,7 +160,7 @@
           return q.pull();
         }
 #else
- call_pull(q,go)
+ call_pull(&q,&go)
 #endif
     );
 


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