Opened 14 years ago
Closed 12 years ago
#2747 closed Patches (fixed)
inline warning
Reported by: | Owned by: | Anthony Williams | |
---|---|---|---|
Milestone: | Boost 1.39.0 | Component: | thread |
Version: | Boost Development Trunk | Severity: | Problem |
Keywords: | Cc: | jwakely.boost@… |
Description
farm6 1234338979.38 : cc1plus: warnings being treated as errors farm6 1234338979.38 : In file included from /u/yang/.local/armed/include/boost/thread/condition_variable.hpp:16, farm6 1234338979.38 : from /u/yang/.local/armed/include/boost/thread.hpp:14, farm6 1234338979.38 : from main.lzz:13, farm6 1234338979.38 : from main.cc:4: farm6 1234338979.38 : /u/yang/.local/armed/include/boost/thread/pthread/condition_variable.hpp:23: error: ‘bool boost::condition_variable::timed_wait(boost::unique_lock<boost::mutex>&, const boost::system_time&)’ was used before it was declared inline farm6 1234338979.38 : /u/yang/.local/armed/include/boost/thread/pthread/condition_variable_fwd.hpp:49: error: previous non-inline declaration here
Attachments (1)
Change History (6)
comment:1 by , 13 years ago
Cc: | added |
---|
comment:3 by , 13 years ago
In order to respect C++ conformance the inline declaration should be at the declaration, so we should have the following declarations in boost/thread/pthread/condition_variable_fwd.hpp
inline void wait(unique_lock<mutex>& m); inline bool timed_wait(unique_lock<mutex>& m,boost::system_time const& wait_until); inline void notify_one(); inline void notify_all();
comment:4 by , 12 years ago
Type: | Bugs → Patches |
---|
comment:5 by , 12 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
The problem is due to the use of this overload of timed_wait in the xtime overload, which causes a gcc warning (it is not a conformance issue).
Thanks for the patch.
Fixed on trunk.
Note:
See TracTickets
for help on using tickets.
what version of GCC are you uing?