-
-
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
when use c++20, compile failed #1068
Comments
I get the same error. The reason is the changed wording in the When using C++20, this code is invalid: template <typename T>
struct Foo {
Foo<T>() { }
~Foo<T>() { }
}; The Apparently, MSVC doesn't enforce this rule, but GCC 10.2 from my WSL2 Ubuntu does. |
Same problem. Here is my log: Click here to expand log
How we can fix that problem? |
It is not a real fix but lowering cxx version to c++17 solved this same issue for me |
You can either use the develop branch which contains a fix for this, downgrade to C++17, or apply a patch like https://patch-diff.githubusercontent.com/raw/zaphoyd/websocketpp/pull/1060.patch |
This is a duplicate of #1058 and probably many others. |
In file included from /home/hijiang/code/mms/build/include/websocketpp/config/core.hpp:51,
from /home/hijiang/code/mms/build/include/websocketpp/config/asio_no_tls.hpp:31,
from /home/hijiang/code/mms/src/server/webrtc/webrtc_session.hpp:6,
from /home/hijiang/code/mms/src/server/webrtc/webrtc_server.hpp:5,
from /home/hijiang/code/mms/src/main.cpp:18:
/home/hijiang/code/mms/build/include/websocketpp/logger/basic.hpp:100:54: error: expected ‘)’ before ‘&&’ token
100 | basic<concurrency,names>(basic<concurrency,names> && other)
| ~ ^~~
| )
In file included from /home/hijiang/code/mms/build/include/websocketpp/roles/server_endpoint.hpp:31,
from /home/hijiang/code/mms/build/include/websocketpp/server.hpp:31,
from /home/hijiang/code/mms/src/server/webrtc/webrtc_session.hpp:7,
from /home/hijiang/code/mms/src/server/webrtc/webrtc_server.hpp:5,
from /home/hijiang/code/mms/src/main.cpp:18:
/home/hijiang/code/mms/build/include/websocketpp/endpoint.hpp:112:5: error: template-id not allowed for destructor
112 | ~endpoint<connection,config>() {}
| ^
In file included from /home/hijiang/code/mms/build/include/websocketpp/server.hpp:31,
from /home/hijiang/code/mms/src/server/webrtc/webrtc_session.hpp:7,
from /home/hijiang/code/mms/src/server/webrtc/webrtc_server.hpp:5,
from /home/hijiang/code/mms/src/main.cpp:18:
/home/hijiang/code/mms/build/include/websocketpp/roles/server_endpoint.hpp:75:5: error: template-id not allowed for destructor
75 |
server() {}| ^
/home/hijiang/code/mms/build/include/websocketpp/roles/server_endpoint.hpp:79:34: error: expected ‘)’ before ‘&’ token
79 | server(server &) = delete;
| ~ ^
| )
/home/hijiang/code/mms/build/include/websocketpp/roles/server_endpoint.hpp:87:34: error: expected ‘)’ before ‘&&’ token
87 | server(server && o) : endpoint<connection,config>(std::move(o)) {}
| ~ ^~~
The text was updated successfully, but these errors were encountered: