I see an error, as does Travis CI (both shown below), when running make after this change. The Appveyor build is failing too (less clear if its the same reason), though the build did complete on the ASF Jenkins. After a quick google, the posts at http://stackoverflow.com/questions/14431776/c-ntohs-fails-on-higher-optimization-levels suggest the fix is to remove the "::" before ntohs, which indeed seems to get things going again for me. Any reason not to do that?
Robbie Travis: [ 96%] Building CXX object examples/cpp/CMakeFiles/select_broker.dir/select_broker.cpp.o /home/travis/build/apache/qpid-proton/examples/cpp/select_broker.cpp: In member function ‘void broker::accept()’: /home/travis/build/apache/qpid-proton/examples/cpp/select_broker.cpp:139:31: error: expected id-expression before ‘(’ token Local: from /home/gemmellr/workspace/proton/examples/cpp/select_broker.cpp:20: /home/gemmellr/workspace/proton/examples/cpp/select_broker.cpp: In member function ‘void broker::accept()’: /home/gemmellr/workspace/proton/examples/cpp/select_broker.cpp:139:31: error: expected id-expression before ‘(’ token << ":" << ::ntohs(client_addr.sin_port) ^ On 2 November 2015 at 23:14, <acon...@apache.org> wrote: > Repository: qpid-proton > Updated Branches: > refs/heads/master 4f5e18a05 -> 193a7dd5d > > > PROTON-1036: c++: engine API for integration with external IO frameworks > > proton::engine wraps the pn transport, connection and collector objects and > provides a simple bytes-in/bytes-out interface that can be used to integrate > proton with any IO framework. > > - added proton::engine > - added proton::event_loop base class for proton::engine and > proton::container. > - extracted broker.hpp: common code for example brokers (queue and handler) > - added select_broker.cpp example > - added url::port_int() to get the integer value of a URL. > > > Project: http://git-wip-us.apache.org/repos/asf/qpid-proton/repo > Commit: http://git-wip-us.apache.org/repos/asf/qpid-proton/commit/193a7dd5 > Tree: http://git-wip-us.apache.org/repos/asf/qpid-proton/tree/193a7dd5 > Diff: http://git-wip-us.apache.org/repos/asf/qpid-proton/diff/193a7dd5 > > Branch: refs/heads/master > Commit: 193a7dd5d896ce62143b4a52179de067ae491abb > Parents: 4f5e18a > Author: Alan Conway <acon...@redhat.com> > Authored: Mon Nov 2 17:56:03 2015 -0500 > Committer: Alan Conway <acon...@redhat.com> > Committed: Mon Nov 2 18:14:08 2015 -0500 > > ---------------------------------------------------------------------- > examples/cpp/CMakeLists.txt | 6 + > examples/cpp/broker.cpp | 171 ++------------- > examples/cpp/broker.hpp | 213 +++++++++++++++++++ > examples/cpp/example_test.py | 3 +- > examples/cpp/select_broker.cpp | 186 ++++++++++++++++ > proton-c/bindings/cpp/CMakeLists.txt | 1 + > proton-c/bindings/cpp/README.md | 2 - > proton-c/bindings/cpp/docs/mainpage.md | 6 + > .../bindings/cpp/include/proton/connection.hpp | 21 +- > .../bindings/cpp/include/proton/container.hpp | 4 +- > proton-c/bindings/cpp/include/proton/engine.hpp | 155 ++++++++++++++ > proton-c/bindings/cpp/include/proton/event.hpp | 9 +- > .../bindings/cpp/include/proton/event_loop.hpp | 41 ++++ > proton-c/bindings/cpp/include/proton/types.hpp | 3 - > proton-c/bindings/cpp/include/proton/url.hpp | 4 + > proton-c/bindings/cpp/src/connection.cpp | 9 +- > proton-c/bindings/cpp/src/connector.cpp | 2 +- > proton-c/bindings/cpp/src/container_impl.cpp | 2 +- > proton-c/bindings/cpp/src/engine.cpp | 132 ++++++++++++ > proton-c/bindings/cpp/src/event.cpp | 9 + > proton-c/bindings/cpp/src/messaging_event.cpp | 6 +- > proton-c/bindings/cpp/src/messaging_event.hpp | 2 +- > proton-c/bindings/cpp/src/proton_event.cpp | 25 ++- > proton-c/bindings/cpp/src/proton_event.hpp | 109 +++++----- > proton-c/bindings/cpp/src/url.cpp | 15 +- > 25 files changed, 901 insertions(+), 235 deletions(-) > ---------------------------------------------------------------------- > > <snip>