Opened 11 years ago

Closed 11 years ago

#6456 closed Bugs (fixed)

trunk compilation errors converting future_errc to int

Reported by: ramon.casellas@… Owned by: viboes
Milestone: Boost 1.50.0 Component: thread
Version: Boost Development Trunk Severity: Problem
Keywords: boost future convert future_errc Cc:

Description

Dear Boot Thread maintainers,

I am unable to compile current boost trunk (1.49) thread library. I am running gcc 4.6.2 on a precise ubuntu, 64 bit, c++11 mode.

Details:

libs/thread/src/future.cpp: In member function ‘virtual std::string boost::thread_detail::future_error_category::message(int) const’: libs/thread/src/future.cpp:33:27: error: could not convert ‘(boost::future_errc)0’ from ‘boost::future_errc’ to ‘int’ libs/thread/src/future.cpp:36:27: error: could not convert ‘(boost::future_errc)1’ from ‘boost::future_errc’ to ‘int’ libs/thread/src/future.cpp:39:27: error: could not convert ‘(boost::future_errc)2’ from ‘boost::future_errc’ to ‘int’ libs/thread/src/future.cpp:41:27: error: could not convert ‘(boost::future_errc)3’ from ‘boost::future_errc’ to ‘int’

"g++" -ftemplate-depth-128 -O3 -finline-functions -Wno-inline -Wall -pthread -fPIC -m64 -Wno-long-long -std=gnu++0x -DBOOST_ALL_NO_LIB=1 -DBOOST_CHRONO_DYN_LINK=1 -DBOOST_SYSTEM_DYN_LINK=1 -DBOOST_SYSTEM_NO_DEPRECATED -DBOOST_THREAD_BUILD_DLL=1 -DBOOST_THREAD_POSIX -DNDEBUG -I"." -c -o "bin.v2/libs/thread/build/gcc-4.6/release/address-model-64/threading-multi/future.o" "libs/thread/src/future.cpp"

...failed gcc.compile.c++ bin.v2/libs/thread/build/gcc-4.6/release/address-model-64/threading-multi/future.o..

Change History (3)

comment:1 by viboes, 11 years ago

Thanks for catching this enum class issue.

I guess this will solve the problem

        switch (BOOST_SCOPED_ENUM_NATIVE(future_errc)(ev))

Committed revision 76952.

comment:2 by viboes, 11 years ago

Owner: changed from Anthony Williams to viboes
Status: newassigned

comment:3 by viboes, 11 years ago

Resolution: fixed
Status: assignedclosed
Note: See TracTickets for help on using tickets.