Stiffstream / restinio

Cross-platform, efficient, customizable, and robust asynchronous HTTP(S)/WebSocket server C++ library with the right balance between performance and ease of use
Other
1.15k stars 93 forks source link

error: exception specification of explicitly defaulted move constructor... in buffers.hpp #91

Closed Lord-Kamina closed 4 years ago

Lord-Kamina commented 4 years ago

This code was introduced in #53.

I was trying to compile the example from the README to check whether I am including RESTinio appropriately in my project, but I get this error:

/Users/Koji/performous/3rdparty/restinio/dev/restinio/buffers.hpp:215:3: error: exception specification of explicitly defaulted move constructor
      does not match the calculated one
                datasizeable_buf_t( datasizeable_buf_t && ) noexcept = default; // allow only explicit move.
                ^
/Users/Koji/performous/3rdparty/restinio/dev/restinio/buffers.hpp:381:3: note: in instantiation of template class
      'restinio::impl::datasizeable_buf_t<fmt::v6::basic_memory_buffer<char, 1, std::__1::allocator<char> > >' requested here
                alignof( fmt_minimal_memory_buffer_buf_t ) } );
                ^

I am using XCode's Clang on macOS 10.14.6

eao197 commented 4 years ago

Hi!

I am using XCode's Clang on macOS 10.14.6

I have no macOS and don't know the version of your clang compiler. So I can't reproduce this problem and fix it.

Could you tell me more about your clang version? Maybe the output of clang++ -v command?

Lord-Kamina commented 4 years ago
Apple clang version 11.0.0 (clang-1100.0.33.16)
Target: x86_64-apple-darwin18.7.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

But I don't think the macOS Clang versions are comparable to stock Clang versions.

Lord-Kamina commented 4 years ago

According to Wikipedia:

Xcode: 11.3
cctools: 949.0.1
ld64: 530
LLVM: 8.0.0[127]
eao197 commented 4 years ago

RESTinio is successfully checked by clang-8 on Linux.

Do you use dependencies (like fmtlib) from RESTinio distributive or install them by yourself? Which version of fmtlib do you have?

Lord-Kamina commented 4 years ago

RESTinio is successfully checked by clang-8 on Linux.

Do you use dependencies (like fmtlib) from RESTinio distributive or install them by yourself? Which version of fmtlib do you have?

I am hacking the CMakeLists to look for installed versions of the dependencies according to your manual and if they can't be found, include them as submodules.

In this case, fmt should be 6.2.0

Lord-Kamina commented 4 years ago

This is re: gcc but it seems to be related to the same issue, maybe it is of help:

https://bugs.chromium.org/p/chromium/issues/detail?id=843143

eao197 commented 4 years ago

We haven't checked RESTinio with fmtlib-6.2.0 yet. We're using fmtlib 6.1.2 during the work on RESTinio.

Lord-Kamina commented 4 years ago

RESTinio is successfully checked by clang-8 on Linux.

Do you use dependencies (like fmtlib) from RESTinio distributive or install them by yourself? Which version of fmtlib do you have?

Will try using 6.1.2 later and report.

Lord-Kamina commented 4 years ago

And it's still the same error with fmt 6.1.2.

Also check https://github.com/mapnik/mapnik/issues/3274

Removing the noexcept makes it compile.

Lord-Kamina commented 4 years ago

Ok nevermind, it was my bad. I had made a mistake on my CMake modification and it wasn't actually including all the restinio source. Fixing that makes it work ok (and for the record, it also works with libfmt 6.2.0)

eao197 commented 4 years ago

and for the record, it also works with libfmt 6.2.0

I glad to hear it.