Subject: [Boost-bugs] [Boost C++ Libraries] #6147: message_queue sample fails to compile in 32-bit
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2011-11-18 19:40:56
#6147: message_queue sample fails to compile in 32-bit
--------------------------------------------+-------------------------------
Reporter: Graham Perks <graham@â¦> | Owner: igaztanaga
Type: Bugs | Status: new
Milestone: To Be Determined | Component: interprocess
Version: Boost 1.48.0 | Severity: Regression
Keywords: |
--------------------------------------------+-------------------------------
Just upgraded to 1.48.
On OS X I compile the sample program with: gcc -I <blah path to
boost>/include -arch i386 main.cpp
and it fails with "....boost/interprocess/ipc/message_queue.hpp:330:
error: no matching function for call to âget_rounded_size(long unsigned
int, const unsigned int&)â"
It's the MQ creation line that fails. If I build for x64, it compiles
successfully. The source is:
#define BOOST_DATE_TIME_NO_LIB
#include <boost/interprocess/ipc/message_queue.hpp>
#include <iostream>
#include <vector>
using namespace boost::interprocess;
int main ()
{
try{
//Erase previous message queue
message_queue::remove("message_queue");
//Create a message_queue.
message_queue mq
(create_only //only create
,"message_queue" //name
,100 //max message number
,sizeof(int) //max message size
);
//Send 100 numbers
for(int i = 0; i < 100; ++i){
mq.send(&i, sizeof(i), 0);
}
}
catch(interprocess_exception &ex){
std::cout << ex.what() << std::endl;
return 1;
}
return 0;
}
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/6147> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:07 UTC