Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r76598 - trunk/libs/thread/test
From: vicente.botet_at_[hidden]
Date: 2012-01-20 13:53:55


Author: viboes
Date: 2012-01-20 13:53:55 EST (Fri, 20 Jan 2012)
New Revision: 76598
URL: http://svn.boost.org/trac/boost/changeset/76598

Log:
Thread: Try to fix 6431 - MinGW: Cannot export (anonymous namespace)::thread_binder
Text files modified:
   trunk/libs/thread/test/util.inl | 37 +++++++++++++++++++++++++++++++------
   1 files changed, 31 insertions(+), 6 deletions(-)

Modified: trunk/libs/thread/test/util.inl
==============================================================================
--- trunk/libs/thread/test/util.inl (original)
+++ trunk/libs/thread/test/util.inl 2012-01-20 13:53:55 EST (Fri, 20 Jan 2012)
@@ -98,7 +98,9 @@
     wait_type type;
     int secs;
 };
-
+}
+namespace thread_detail_anon
+{
 template <typename F>
 class indirect_adapter
 {
@@ -126,18 +128,28 @@
     void operator=(indirect_adapter&);
 };
 
+}
+// boostinspect:nounnamed
+namespace
+{
+
 template <typename F>
 void timed_test(F func, int secs,
     execution_monitor::wait_type type=DEFAULT_EXECUTION_MONITOR_TYPE)
 {
     execution_monitor monitor(type, secs);
- indirect_adapter<F> ifunc(func, monitor);
+ thread_detail_anon::indirect_adapter<F> ifunc(func, monitor);
     monitor.start();
     boost::thread thrd(ifunc);
     BOOST_REQUIRE_MESSAGE(monitor.wait(),
         "Timed test didn't complete in time, possible deadlock.");
 }
 
+}
+
+namespace thread_detail_anon
+{
+
 template <typename F, typename T>
 class thread_binder
 {
@@ -151,12 +163,21 @@
     T param;
 };
 
+}
+
+// boostinspect:nounnamed
+namespace
+{
 template <typename F, typename T>
-thread_binder<F, T> bind(const F& func, const T& param)
+thread_detail_anon::thread_binder<F, T> bind(const F& func, const T& param)
 {
- return thread_binder<F, T>(func, param);
+ return thread_detail_anon::thread_binder<F, T>(func, param);
+}
 }
 
+namespace thread_detail_anon
+{
+
 template <typename R, typename T>
 class thread_member_binder
 {
@@ -172,11 +193,15 @@
     T& param;
 };
 
+}
 
+// boostinspect:nounnamed
+namespace
+{
 template <typename R, typename T>
-thread_member_binder<R, T> bind(R (T::*func)(), T& param)
+thread_detail_anon::thread_member_binder<R, T> bind(R (T::*func)(), T& param)
 {
- return thread_member_binder<R, T>(func, param);
+ return thread_detail_anon::thread_member_binder<R, T>(func, param);
 }
 } // namespace
 


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