-
-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
In basic.hpp, a few compiling error with g++11, C++20, #991
Comments
Same issue there with GCC 11.0.1 in C++20 mode |
the reason is the useless usage of <concurrency,names> after constructor definition (and destructor), after removing them, it build fine |
can confirm the issue (and the solution) |
note that this was valid until C++20: https://timsong-cpp.github.io/cppwp/n4861/diff.cpp17.class#2 |
feel free to pull my patch jcelerier@3e761b5 |
do you think it will be merged at some point? looks like the project hasn't had any commit in a long time... |
A fix for this has been pushed to the develop branch. That branch will be rolled up into a 0.9 release soon. |
any update on the 0.9 release? |
Will fork to get the changes from develop in the meantime, but a new 0.9 release would be great 🙏 |
Bump on the 0.9 release 🙏 |
Please bump on the 0.9 release QQ |
Remaining issues: websocketpp 0.8.2 (the latest version) contains constructs that are valid with C++17 but errors with C++20; issue zaphoyd/websocketpp#991. - A solution was pulled into develop, with the promise to put it in the upcoming 0.9 release "soon" - that was two years ago. - A similar patch was merged into vcpkg, but this one is incomplete, so build errors remain. On Ubuntu 22, Docker tests fail with CURLE_COULDNT_CONNECT. This also happens with builds based on g++-10 and earlier commits, so isn't related to g++-12.
…:50 2022 -0500 git -C external/websocketpp/ checkout b9aeec6eaf3d5610503439b4fae3581d9aff08e8 This includes fixes applied after version 0.8.2, in particular it allows g++ to build the sources with C++20 enabled. See: zaphoyd/websocketpp#991 Signed-off-by: Tim Janik <timj@gnu.org>
* g++-bun-pnpm-ci: GITHUB: workflows/testing.yml: test Arch builds with g++ MISC: Dockerfile.arch: provide pnpm as JS package manager MISC: Dockerfile.arch: update build comments MISC: Dockerfile.focal: provide bun as JS package manager MISC: cirun: defer check for docker-buildx-plugin until we actually need it Makefile.mk: guard against `prefix := / / ` etc which will confuse `rm -rf` EXTERNAL: websocketpp: update zaphoyd/websocketpp to 2022-05-24 18:42:50 2022 -0500 git -C external/websocketpp/ checkout b9aeec6eaf3d5610503439b4fae3581d9aff08e8 This includes fixes applied after version 0.8.2, in particular it allows g++ to build the sources with C++20 enabled. See: zaphoyd/websocketpp#991 Signed-off-by: Tim Janik <timj@gnu.org>
Bump for 0.9 release, please! |
2000 years later |
3000 years later |
Needed for support on GCC and c++20. zaphoyd/websocketpp#991
I have tried the lastest version, and v0.8.2 tags, the same error message. No this message if compile with C++17.
/home/OGic-2/cppsrc/../3rdparty/websocketpp/logger/basic.hpp:61:54: error: expected ')' before 'h'
61 | basic<concurrency,names>(channel_type_hint::value h =channel_type_hint::access)
| ~ ^~
| )
/home/OGic-2/cppsrc/../3rdparty/websocketpp/logger/basic.hpp:66:42: error: expected ')' before '*' token
66 | basic<concurrency,names>(std::ostream * out)
| ~ ^~
| )
/home/OGic-2/cppsrc/../3rdparty/websocketpp/logger/basic.hpp:71:35: error: expected ')' before 'c'
71 | basic<concurrency,names>(level c, channel_type_hint::value h =
| ~ ^~
| )
/home/OGic-2/cppsrc/../3rdparty/websocketpp/logger/basic.hpp:77:35: error: expected ')' before 'c'
77 | basic<concurrency,names>(level c, std::ostream * out)
| ~ ^~
| )
/home/OGic-2/cppsrc/../3rdparty/websocketpp/logger/basic.hpp:83:5: error: template-id not allowed for destructor
83 | ~basic<concurrency,names>() {}
| ^
/home/OGic-2/cppsrc/../3rdparty/websocketpp/logger/basic.hpp:86:54: error: expected ')' before 'const'
86 | basic<concurrency,names>(basic<concurrency,names> const & other)
| ~ ^~~~~~
| )
/home/OGic-2/cppsrc/../3rdparty/websocketpp/logger/basic.hpp:99:54: error: expected ')' before '&&' token
99 | basic<concurrency,names>(basic<concurrency,names> && other)
| ~ ^~~
| )
In file included from /home/OGic-2/cppsrc/../3rdparty/websocketpp/roles/server_endpoint.hpp:31,
from /home/OGic-2/cppsrc/../3rdparty/websocketpp/server.hpp:31,
from /home/OGic-2/cppsrc/ws.hpp:4,
from /home/OGic-2/cppsrc/main.cpp:15:
/home/OGic-2/cppsrc/../3rdparty/websocketpp/endpoint.hpp:112:5: error: template-id not allowed for destructor
112 | ~endpoint<connection,config>() {}
| ^
In file included from /home/OGic-2/cppsrc/../3rdparty/websocketpp/server.hpp:31,
from /home/OGic-2/cppsrc/ws.hpp:4,
from /home/OGic-2/cppsrc/main.cpp:15:
/home/OGic-2/cppsrc/../3rdparty/websocketpp/roles/server_endpoint.hpp:75:5: error: template-id not allowed for destructor
75 |
server() {}| ^
/home/OGic-2/cppsrc/../3rdparty/websocketpp/roles/server_endpoint.hpp:79:34: error: expected ')' before '&' token
79 | server(server &) = delete;
| ~ ^
| )
/home/OGic-2/cppsrc/../3rdparty/websocketpp/roles/server_endpoint.hpp:87:34: error: expected ')' before '&&' token
87 | server(server && o) : endpoint<connection,config>(std::move(o)) {}
| ~ ^~~
| )
In file included from /home/OGic-2/cppsrc/globals.h:11,
from /home/OGic-2/cppsrc/CChannel.h:11,
from /home/OGic-2/cppsrc/COGCore.h:13,
from /home/OGic-2/cppsrc/main.cpp:17:
/home/OGic-2/cppsrc/../3rdparty/nlohmann/json.hpp: In static member function 'static CharType nlohmann::detail::binary_writer<BasicJsonType, CharType>::to_char_type(uint8_t)':
/home/OGic-2/cppsrc/../3rdparty/nlohmann/json.hpp:12595:28: warning: 'template struct std::is_pod' is deprecated: use is_standard_layout && is_trivial instead [-Wdeprecated-declarations]
12595 | static_assert(std::is_pod::value, "CharType must be POD");
| ^~~~~~
In file included from /home/OGic-2/cppsrc/../3rdparty/fmt/ranges.h:16,
from /home/OGic-2/cppsrc/main.cpp:3:
/usr/local/include/c++/11.1.0/type_traits:700:5: note: declared here
700 | is_pod
| ^~~~~~
In file included from /home/OGic-2/cppsrc/../3rdparty/websocketpp/roles/server_endpoint.hpp:31,
from /home/OGic-2/cppsrc/../3rdparty/websocketpp/server.hpp:31,
from /home/OGic-2/cppsrc/ws.hpp:4,
from /home/OGic-2/cppsrc/main.cpp:15:
/home/OGic-2/cppsrc/../3rdparty/websocketpp/endpoint.hpp: In instantiation of 'websocketpp::endpoint<connection, config>::endpoint(bool) [with connection = websocketpp::connectionwebsocketpp::config::asio; config = websocketpp::config::asio]':
/home/OGic-2/cppsrc/../3rdparty/websocketpp/roles/server_endpoint.hpp:69:43: required from 'websocketpp::server::server() [with config = websocketpp::config::asio]'
/home/OGic-2/cppsrc/ws.hpp:12:22: required from here
/home/OGic-2/cppsrc/../3rdparty/websocketpp/endpoint.hpp:92:16: error: no matching function for call to 'websocketpp::log::basic<websocketpp::concurrency::basic, websocketpp::log::alevel>::basic(const level&, const value&)'
92 | : m_alog(new alog_type(config::alog_level, log::channel_type_hint::access))
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/OGic-2/cppsrc/../3rdparty/websocketpp/config/core.hpp:51,
from /home/OGic-2/cppsrc/../3rdparty/websocketpp/config/asio_no_tls.hpp:31,
from /home/OGic-2/cppsrc/ws.hpp:3,
from /home/OGic-2/cppsrc/main.cpp:15:
/home/OGic-2/cppsrc/../3rdparty/websocketpp/logger/basic.hpp:59:7: note: candidate: 'websocketpp::log::basic<websocketpp::concurrency::basic, websocketpp::log::alevel>::basic()' (deleted)
59 | class basic {
| ^~~~~
/home/OGic-2/cppsrc/../3rdparty/websocketpp/logger/basic.hpp:59:7: note: candidate expects 0 arguments, 2 provided
/home/OGic-2/cppsrc/../3rdparty/websocketpp/logger/basic.hpp:59:7: note: candidate: 'websocketpp::log::basic<websocketpp::concurrency::basic, websocketpp::log::alevel>::basic(const websocketpp::log::basic<websocketpp::concurrency::basic, websocketpp::log::alevel>&)' (deleted)
/home/OGic-2/cppsrc/../3rdparty/websocketpp/logger/basic.hpp:59:7: note: candidate expects 1 argument, 2 provided
In file included from /home/OGic-2/cppsrc/../3rdparty/websocketpp/roles/server_endpoint.hpp:31,
from /home/OGic-2/cppsrc/../3rdparty/websocketpp/server.hpp:31,
from /home/OGic-2/cppsrc/ws.hpp:4,
from /home/OGic-2/cppsrc/main.cpp:15:
/home/OGic-2/cppsrc/../3rdparty/websocketpp/endpoint.hpp:93:16: error: no matching function for call to 'websocketpp::log::basic<websocketpp::concurrency::basic, websocketpp::log::elevel>::basic(const level&, const value&)'
93 | , m_elog(new elog_type(config::elog_level, log::channel_type_hint::error))
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/OGic-2/cppsrc/../3rdparty/websocketpp/config/core.hpp:51,
from /home/OGic-2/cppsrc/../3rdparty/websocketpp/config/asio_no_tls.hpp:31,
from /home/OGic-2/cppsrc/ws.hpp:3,
from /home/OGic-2/cppsrc/main.cpp:15:
/home/OGic-2/cppsrc/../3rdparty/websocketpp/logger/basic.hpp:59:7: note: candidate: 'websocketpp::log::basic<websocketpp::concurrency::basic, websocketpp::log::elevel>::basic()' (deleted)
59 | class basic {
| ^~~~~
/home/OGic-2/cppsrc/../3rdparty/websocketpp/logger/basic.hpp:59:7: note: candidate expects 0 arguments, 2 provided
/home/OGic-2/cppsrc/../3rdparty/websocketpp/logger/basic.hpp:59:7: note: candidate: 'websocketpp::log::basic<websocketpp::concurrency::basic, websocketpp::log::elevel>::basic(const websocketpp::log::basic<websocketpp::concurrency::basic, websocketpp::log::elevel>&)' (deleted)
/home/OGic-2/cppsrc/../3rdparty/websocketpp/logger/basic.hpp:59:7: note: candidate expects 1 argument, 2 provided
make[2]: *** [CMakeFiles/cpp20.dir/build.make:76: CMakeFiles/cpp20.dir/main.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:232: CMakeFiles/cpp20.dir/all] Error 2
The text was updated successfully, but these errors were encountered: