Details
-
Improvement
-
Status: Closed
-
Minor
-
Resolution: Not A Bug
-
proton-c-0.18.0
-
None
-
None
-
Linux, gcc (GCC) 7.0.1 20170409 (experimental), git tip at
commit 72b7ea0508e94aae3e5d9470293bc5c7e8250a45 (upstream/master)
PROTON-1592: [python] restore original tx_recv.py example
Description
Following C++11 code does not compile
auto handler = proton::messaging_handler();
auto container = proton::container(handler); // container is not move constructible
Error from GCC is
/home/jdanek/Work/repos/qpid-proton/proton-c/bindings/cpp/src/container_test.cpp: In function ‘int {anonymous}::test_container_schedule_multithreaded()’: /home/jdanek/Work/repos/qpid-proton/proton-c/bindings/cpp/src/container_test.cpp:591:47: error: use of deleted function ‘proton::container::container(const proton::container&)’ auto container = proton::container(handler); // container is not move constructible ^ In file included from /home/jdanek/Work/repos/qpid-proton/proton-c/bindings/cpp/src/container_test.cpp:28:0: /home/jdanek/Work/repos/qpid-proton/proton-c/bindings/cpp/include/proton/container.hpp:55:27: note: ‘proton::container::container(const proton::container&)’ is implicitly deleted because the default definition would be ill-formed: class PN_CPP_CLASS_EXTERN container { ^~~~~~~~~ /home/jdanek/Work/repos/qpid-proton/proton-c/bindings/cpp/include/proton/container.hpp:55:27: error: use of deleted function ‘constexpr proton::internal::pn_unique_ptr<proton::container::impl>::pn_unique_ptr(const proton::internal::pn_unique_ptr<proton::container::impl>&)’ In file included from /home/jdanek/Work/repos/qpid-proton/proton-c/bindings/cpp/include/proton/connection_options.hpp:29:0, from /home/jdanek/Work/repos/qpid-proton/proton-c/bindings/cpp/src/container_test.cpp:27: /home/jdanek/Work/repos/qpid-proton/proton-c/bindings/cpp/include/proton/./internal/pn_unique_ptr.hpp:43:26: note: ‘constexpr proton::internal::pn_unique_ptr<proton::container::impl>::pn_unique_ptr(const proton::internal::pn_unique_ptr<proton::container::impl>&)’ is implicitly declared as deleted because ‘proton::internal::pn_unique_ptr<proton::container::impl>’ declares a move constructor or move assignment operator template <class T> class pn_unique_ptr { ^~~~~~~~~~~~~ make[3]: *** [proton-c/bindings/cpp/CMakeFiles/container_test.dir/build.make:63: proton-c/bindings/cpp/CMakeFiles/container_test.dir/src/container_test.cpp.o] Error 1