adedov / libiqxmlrpc

Libiqxmlrpc is an implementation of the XML-RPC standard in C++.
Other
14 stars 9 forks source link

C++11 overhaul - Fixes #7, fixes #9 #14

Open TedLyngmo opened 4 years ago

TedLyngmo commented 4 years ago

This is meant as a co-op patch to make the library use and require C++11 or later. This is not a backwards compatible patch since it'll fail to build in C++ versions prior to C++11.

adedov commented 4 years ago

Ted,

Thank you! Will process this week.

adedov commented 4 years ago

Can't build with Mac CLang C++: c++ --version Apple clang version 11.0.0 (clang-1100.0.33.17) Target: x86_64-apple-darwin19.6.0 Thread model: posix InstalledDir: /Library/Developer/CommandLineTools/usr/bin

[ 80%] Building CXX object tests/CMakeFiles/server-test.dir/test_server.cc.o /Users/anton-dedov/personal/src/libiqxmlrpc/tests/test_server.cc:58:3: error: constructor for 'CallCountingInterceptor' must explicitly initialize the base class 'iqxmlrpc::Interceptor' which does not have a default constructor CallCountingInterceptor(): count(0) {} ^ /Users/anton-dedov/personal/src/libiqxmlrpc/libiqxmlrpc/method.h:103:23: note: 'iqxmlrpc::Interceptor' declared here class LIBIQXMLRPC_API Interceptor { ^ /Users/anton-dedov/personal/src/libiqxmlrpc/tests/test_server.cc:108:3: error: call to constructor of 'std::unique_ptr' is ambiguous ef_(0), ^ ~ /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/memory:2466:13: note: candidate constructor [with _Dummy = true, $1 = void] constexpr unique_ptr(nullptr_t) noexcept : ptr_(pointer()) {} ^ /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/memory:2471:12: note: candidate constructor [with _Dummy = true, $1 = void] explicit uniqueptr(pointer p) noexcept : ptr(p) {} ^ /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/memory:2494:3: note: candidate constructor unique_ptr(unique_ptr&& u) noexcept ^ /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/memory:2401:28: note: candidate constructor (the implicit copy constructor) has been implicitly deleted class _LIBCPP_TEMPLATE_VIS unique_ptr { ^ /Users/anton-dedov/personal/src/libiqxmlrpc/tests/test_server.cc:109:3: error: call to constructor of 'std::uniqueptr' is ambiguous impl(0) ^ ~ /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/memory:2466:13: note: candidate constructor [with _Dummy = true, $1 = void] constexpr unique_ptr(nullptr_t) noexcept : ptr_(pointer()) {} ^ /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/memory:2471:12: note: candidate constructor [with _Dummy = true, $1 = void] explicit uniqueptr(pointer p) noexcept : ptr(p) {} ^ /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/memory:2494:3: note: candidate constructor unique_ptr(unique_ptr&& u) noexcept ^ /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/memory:2401:28: note: candidate constructor (the implicit copy constructor) has been implicitly deleted class _LIBCPP_TEMPLATE_VIS unique_ptr { ^ /Users/anton-dedov/personal/src/libiqxmlrpc/tests/testserver.cc:132:31: error: call to implicitly-deleted default constructor of 'LogInterceptor' impl->push_interceptor(new LogInterceptor); ^ /Users/anton-dedov/personal/src/libiqxmlrpc/tests/test_server.cc:24:23: note: default constructor of 'LogInterceptor' is implicitly deleted because base class 'iqxmlrpc::Interceptor' has no default constructor class LogInterceptor: public Interceptor { ^ /Users/anton-dedov/personal/src/libiqxmlrpc/tests/testserver.cc:133:31: error: call to implicitly-deleted default constructor of 'TraceInterceptor' impl->push_interceptor(new TraceInterceptor); ^ /Users/anton-dedov/personal/src/libiqxmlrpc/tests/test_server.cc:33:25: note: default constructor of 'TraceInterceptor' is implicitly deleted because base class 'iqxmlrpc::Interceptor' has no default constructor class TraceInterceptor: public Interceptor { ^ 5 errors generated. make[2]: [tests/CMakeFiles/server-test.dir/test_server.cc.o] Error 1 make[1]: [tests/CMakeFiles/server-test.dir/all] Error 2 make: *** [all] Error 2

TedLyngmo commented 4 years ago

Oups - I see I missed building the tests but I fixed it. It now compiles and runs all the tests OK for me.

TedLyngmo commented 2 years ago

I just noticed this old patchset. Was there a problem with it? I hardly remember what made me put it up here. It must have been some code I used 2 years ago that used this library but I don't remember what it was :-)