qpid-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jiri Daněk (JIRA) <j...@apache.org>
Subject [jira] [Created] (PROTON-1629) [cpp] proton::container is not move constructible
Date Fri, 13 Oct 2017 15:09:00 GMT
Jiri Daněk created PROTON-1629:
----------------------------------

             Summary: [cpp] proton::container is not move constructible
                 Key: PROTON-1629
                 URL: https://issues.apache.org/jira/browse/PROTON-1629
             Project: Qpid Proton
          Issue Type: Improvement
          Components: cpp-binding
    Affects Versions: proton-c-0.18.0
         Environment: Linux, gcc (GCC) 7.0.1 20170409 (experimental), git tip at 
commit 72b7ea0508e94aae3e5d9470293bc5c7e8250a45 (upstream/master)
     PROTON-1592: [python] restore original tx_recv.py example
            Reporter: Jiri Daněk
            Assignee: Cliff Jansen
            Priority: Minor


Following C++11 code does not compile

{code}
    auto handler = proton::messaging_handler();
    auto container = proton::container(handler); // container is not move constructible
{code}

Error from GCC is

{noformat}
/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
{noformat}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org


Mime
View raw message