在 basic.hpp 中, 使用 g++11、C++20 编译时出现了一些错误

作者: yushb0602创建于 2021年5月17日更新于 2025年12月11日

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: template-id not allowed for destructor 112 | ~endpoint<connection,config>() {} 12 | ^ 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: template-id not allowed for destructor 75 | ~server() {} 76 | ^ /home/OGic-2/cppsrc/../3rdparty/websocketpp/roles/server_endpoint.hpp:79:34: expected ')' before '&' token 79 | server(server

内容来源: zaphoyd/websocketpp