Boost logo

Boost Users :

Subject: [Boost-users] [Fiber] Boost 1.63 buffered_channel failed to compile with g++ 4.8 on Ubuntu
From: lin li (sdeber_at_[hidden])
Date: 2017-06-23 07:57:30


Hi, guys. I was trying to compile the example code from Boost website for the buffered_channel in Boost 1.63, but it failed with the following error:

In file included from /opt/third_party/include/boost/fiber/all.hpp:15:0,
                 from /home/ak70/HaudDevelopment/HaudCore/HaudCore/Services/HaudSMSService/HaudWorkerJob.h:19,
                 from /home/ak70/HaudDevelopment/HaudCore/HaudCore/Services/HaudSMSService/HaudEndpointWorker.h:16,
                 from /home/ak70/HaudDevelopment/HaudCore/HaudCore/Services/HaudSMSService/HaudEndpointWorker.cpp:7:
/opt/third_party/include/boost/fiber/buffered_channel.hpp: In instantiation of ‘boost::fibers::buffered_channel<T>::buffered_channel(std::size_t) [with T = HAUD::SS7Wrapper*; std::size_t = long unsigned int]’:
/home/ak70/HaudDevelopment/HaudCore/HaudCore/Services/HaudSMSService/HaudEndpointWorker.cpp:23:25: required from here
/opt/third_party/include/boost/fiber/buffered_channel.hpp:49:9: error: use of deleted function ‘std::atomic<long unsigned int>::atomic(const std::atomic<long unsigned int>&)’
         slot() = default;
         ^
In file included from /home/ak70/HaudDevelopment/HaudCore/HaudCore/Services/HaudSMSService/HaudWorkerJob.h:11:0,
                 from /home/ak70/HaudDevelopment/HaudCore/HaudCore/Services/HaudSMSService/HaudEndpointWorker.h:16,
                 from /home/ak70/HaudDevelopment/HaudCore/HaudCore/Services/HaudSMSService/HaudEndpointWorker.cpp:7:
/usr/include/c++/4.8/atomic:658:7: error: declared here
       atomic(const atomic&) = delete;
       ^
In file included from /opt/third_party/include/boost/fiber/all.hpp:15:0,
                 from /home/ak70/HaudDevelopment/HaudCore/HaudCore/Services/HaudSMSService/HaudWorkerJob.h:19,
                 from /home/ak70/HaudDevelopment/HaudCore/HaudCore/Services/HaudSMSService/HaudEndpointWorker.h:16,
                 from /home/ak70/HaudDevelopment/HaudCore/HaudCore/Services/HaudSMSService/HaudEndpointWorker.cpp:7:
/opt/third_party/include/boost/fiber/buffered_channel.hpp:138:16: note: synthesized method ‘boost::fibers::buffered_channel<T>::slot::slot() [with T = HAUD::SS7Wrapper*]’ first required here
         slots_ = new slot[capacity_]();
                ^
make[2]: *** [cpm-bin/gitfortytwolocal_haudbackend_haudcore_origin_master/bin/CMakeFiles/HaudCore.dir/HaudCore/Services/HaudSMSService/HaudEndpointWorker.cpp.o] Error 1
make[1]: *** [cpm-bin/gitfortytwolocal_haudbackend_haudcore_origin_master/bin/CMakeFiles/HaudCore.dir/all] Error 2
make: *** [all] Error 2

Any ideas?



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net