嗨,我收到以下警告
g++ -std=c++0x -Wall -c -I/usr/local/boost_1_53_0 -I/home/aditya/CodeBase/includes MAIN.cpp
In file included from /usr/local/boost_1_53_0/boost/interprocess/detail/managed_open_or_create_impl.hpp:15:0,
from /usr/local/boost_1_53_0/boost/interprocess /managed_shared_memory.hpp:22,
from MAIN.cpp:22:
/usr/local/boost_1_53_0/boost/interprocess/detail/os_thread_functions.hpp: In function ‘void boost::interprocess::ipcdetail::thread_sleep(unsigned int)’:
/usr/local/boost_1_53_0/boost/interprocess/detail/os_thread_functions.hpp:169:65: warning: narrowing conversion of ‘(ms / 1000u)’ from ‘unsigned int’ to ‘__time_t {aka long int}’ inside { } [-Wnarrowing]
/usr/local/boost_1_53_0/boost/interprocess/detail/os_thread_functions.hpp:169:65: warning: narrowing conversion of ‘((ms % 1000u) * 1000000u)’ from ‘unsigned int’ to ‘long int’ inside { } [-Wnarrowing]
在编译以下程序时
#include <iostream>
#include <memory>
#include <boost/thread.hpp>
#include <boost/managed_shared_memory.hpp>
int main(){
return 0;
}
我在 ubuntu 12.04 上使用 gcc 4.7