Boost logo

Boost :

From: Kevin Wheatley (hxpro_at_[hidden])
Date: 2005-08-17 02:40:26


Richard Hadsell wrote:
>
> The mipspro build of regex gives repeated warnings in static_mutex.hpp:
>
> mipspro-C++-action bin/boost/libs/regex/build/libboost_regex.so/mipspro/debug/cpp_regex_traits.o
> cc-1460 CC: WARNING File = /tmp_mnt/netDISKS/cgi/IRIX4/cgi/vendor/library/boost/boost_1_33_0/boost/regex/pending/static_mutex.hpp, Line = 69
> Function function "boost::scoped_static_mutex_lock::locked" is redeclared
> "inline" after being called.
>
> inline bool scoped_static_mutex_lock::locked()const
> ^
>
> I fixed it by declaring both 'operator void const*()' and 'bool
> locked()' inline in all 3 sections of the header:

hmm my fix was, to reorder the file a bit... basically swapping the
order of deffinitions of the two functions.

Kevin

--- boost/regex/pending/static_mutex.hpp Tue Aug 16 08:57:19
2005
+++ include/boost-1_33/boost/regex/pending/static_mutex.hpp Fri Jan
21 17:22:16 2005
@@ -61,14 +61,14 @@
    bool m_have_lock;
 };
 
-inline bool scoped_static_mutex_lock::locked()const
+inline scoped_static_mutex_lock::operator void const*()const
 {
- return m_have_lock;
+ return locked() ? this : 0;
 }
 
-inline scoped_static_mutex_lock::operator void const*()const
+inline bool scoped_static_mutex_lock::locked()const
 {
- return locked() ? this : 0;
+ return m_have_lock;
 }
 
 } // namespace boost

-- 
| Kevin Wheatley, Cinesite (Europe) Ltd | Nobody thinks this      |
| Senior Technology                     | My employer for certain |
| And Network Systems Architect         | Not even myself         |

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk