websocketpp
websocketpp copied to clipboard
In basic.hpp, a few compiling error with g++11, C++20,
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
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 https://github.com/jcelerier/websocketpp/commit/3e761b5aa2d415bbe8cf211c7c9a847e4e5f2044
do you think it will be merged at some point? looks like the project hasn't had any commit in a long time... It is a bit annoying when you are using a package manager like Conan.
A fix for this has been pushed to the develop branch. That branch will be rolled up into a 0.9 release soon.
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 🙏 Works like a charm on Windows
Please bump on the 0.9 release QQ
Bump for 0.9 release, please!
2000 years later
3000 years later