Opened 5 years ago
#13490 new Bugs
Compile error when BOOST_FIBERS_NO_ATOMICS is open
Reported by: | Owned by: | olli | |
---|---|---|---|
Milestone: | To Be Determined | Component: | context |
Version: | Boost 1.66.0 | Severity: | Problem |
Keywords: | fiber, no atomic | Cc: |
Description
It's actually a bug about Boost::fiber but I can't find that component on bug page.
include/boost/fiber/context.hpp: ln 392:
ctx->use_count_.fetch_add( 1, std::memory_order_relaxed);
While BOOST_FIBERS_NO_ATOMICS was defined, type of ctx->use_count_ is std::size_t, which is not a object and doesn't have fetch_add method, so this line failed to compile. There are also other compile errors, like remote_ready_hook_ is not defined but used at scheduler.hpp.
full compile error is:
1>C:\HunterPackages\_Base\3e2037a\384d6ff\cd778ec\Install\include\boost/fiber/context.hpp(392): error C2228: left of '.fetch_add' must have class/struct/union 1> C:\HunterPackages\_Base\3e2037a\384d6ff\cd778ec\Install\include\boost/fiber/context.hpp(392): note: type is 'std::size_t' 1>C:\HunterPackages\_Base\3e2037a\384d6ff\cd778ec\Install\include\boost/fiber/context.hpp(397): error C2228: left of '.fetch_sub' must have class/struct/union 1> C:\HunterPackages\_Base\3e2037a\384d6ff\cd778ec\Install\include\boost/fiber/context.hpp(397): note: type is 'std::size_t' 1>C:\HunterPackages\_Base\3e2037a\384d6ff\cd778ec\Install\include\boost/fiber/scheduler.hpp(78): error C2039: 'remote_ready_hook_': is not a member of 'boost::fibers::context' 1> C:\HunterPackages\_Base\3e2037a\384d6ff\cd778ec\Install\include\boost/fiber/context.hpp(131): note: see declaration of 'boost::fibers::context' 1>C:\HunterPackages\_Base\3e2037a\384d6ff\cd778ec\Install\include\boost/fiber/scheduler.hpp(78): error C2065: 'remote_ready_hook_': undeclared identifier 1>C:\HunterPackages\_Base\3e2037a\384d6ff\cd778ec\Install\include\boost/fiber/scheduler.hpp(78): error C2975: 'PtrToMember': invalid template argument for 'boost::intrusive::member_hook', expected compile-time constant expression 1> C:\HunterPackages\_Base\3e2037a\384d6ff\cd778ec\Install\include\boost/intrusive/options.hpp(123): note: see declaration of 'PtrToMember'
Note:
See TracTickets
for help on using tickets.