Opened 10 years ago
Closed 9 years ago
#7696 closed Bugs (fixed)
Conflict mutex.hpp together with move.hpp
| Reported by: | Owned by: | Ion Gaztañaga | |
|---|---|---|---|
| Milestone: | To Be Determined | Component: | move |
| Version: | Boost 1.52.0 | Severity: | Problem |
| Keywords: | Cc: |
Description
When trying to compile the following code:
#ifndef FRAME_DATA_QUEUE_H
#define FRAME_DATA_QUEUE_H
#include <queue>
//#include <boost/thread/locks.hpp>
#include <boost/thread/mutex.hpp>
//#include <IPStream/Decoder/FrameData.h>
typedef int PFrameData;
class CFrameDataQueue
{
public:
void PushData(PFrameData pData);
PFrameData PopData();
bool IsQueueEmpty();
int GetSize();
void Lock();
void Unlock();
void Clean();
private:
typedef std::queue<PFrameData> TFrameDataQueue;
TFrameDataQueue m_FrameDataQueue;
boost::mutex m_FrameDataQueueMutex;
//boost::unique_lock<boost::mutex> m_Lock;
};
typedef boost::shared_ptr<CFrameDataQueue> PFrameDataQueue;
#endif // FRAME_DATA_QUEUE_H
I got the error (MS Visual Studio 2010 SP1):
1>------ Build started: Project: LibIPStream, Configuration: Debug x64 ------
1>Build started 15.11.2012 16:45:47.
1>InitializeBuildStatus:
1> Touching "x64\Debug\LibIPStream.unsuccessfulbuild".
1>ClCompile:
1> FrameDataServerMediaSubsession.cpp
1> FrameDataSignalSource.cpp
1>D:\SDK_64\boost_1_52_0\boost/move/move.hpp(142): error C2062: type 'bool' unexpected
1> D:\SDK_64\boost_1_52_0\boost/move/move.hpp(143) : see reference to class template instantiation 'boost::move_detail::not_<__formal>' being compiled
1>D:\SDK_64\boost_1_52_0\boost/move/move.hpp(143): error C2143: syntax error : missing ';' before '{'
1>D:\SDK_64\boost_1_52_0\boost/move/move.hpp(143): fatal error C1004: unexpected end-of-file found
1>D:\SDK_64\boost_1_52_0\boost/move/move.hpp(142): error C2062: type 'bool' unexpected
1> D:\SDK_64\boost_1_52_0\boost/move/move.hpp(143) : see reference to class template instantiation 'boost::move_detail::not_<__formal>' being compiled
1>D:\SDK_64\boost_1_52_0\boost/move/move.hpp(143): error C2143: syntax error : missing ';' before '{'
1>D:\SDK_64\boost_1_52_0\boost/move/move.hpp(143): fatal error C1004: unexpected end-of-file found
1>
1>Build FAILED.
1>
1>Time Elapsed 00:00:02.60
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Commenting struct "not_" from move.hpp does the trick:
//template <typename Boolean>
// struct not_
// : public integral_constant<bool, !Boolean::value>
//{};
Change History (3)
comment:1 by , 10 years ago
| Component: | thread → move |
|---|---|
| Owner: | changed from to |
comment:2 by , 10 years ago
comment:3 by , 9 years ago
| Resolution: | → fixed |
|---|---|
| Status: | new → closed |
This bug was already fixed in Boost 1.53. Thanks for the report.
Note:
See TracTickets
for help on using tickets.

The example compiles fine in my Visual 2010 installation with Boost 1.52 (adding a main(){} line in the end of the example).
However, reviewing Thread code I see that it uses non-public Boost.Thread internal classes and defines (like BOOST_MOVE_BOOST_NS, rv<> or has_move_emulation_enabled) not detailed in the documentation. I think that can be source of future incompatibility problems between Thread and Move, as Boost.Thread tries to support multiple move emulations. Much of those internals will change in future versions.