Comments (5)
I get the same error. The reason is the changed wording in the class
section of the C++20 standard paper.
When using C++20, this code is invalid:
template <typename T>
struct Foo {
Foo<T>() { }
~Foo<T>() { }
};
The <T>
part has to be omitted.
Apparently, MSVC doesn't enforce this rule, but GCC 10.2 from my WSL2 Ubuntu does.
from websocketpp.
Same problem. Here is my log:
Click here to expand log
[ 50%] Building CXX object CMakeFiles/AccountApiServer.dir/src/main.cpp.o
In file included from /home/elnee/.conan/data/websocketpp/0.8.2/_/_/package/5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9/include/websocketpp/config/core.hpp:51,
from /home/elnee/.conan/data/websocketpp/0.8.2/_/_/package/5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9/include/websocketpp/config/asio_no_tls.hpp:31,
from /home/elnee/.primebridge/common/include/common/web_socket/web_socket_server.h:5,
from /home/elnee/work/PrimeBridge-Backend/account_api_server/src/main.cpp:9:
/home/elnee/.conan/data/websocketpp/0.8.2/_/_/package/5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9/include/websocketpp/logger/basic.hpp:61:54: error: expected ‘)’ before ‘h’
61 | basic<concurrency,names>(channel_type_hint::value h =
| ~ ^~
| )
/home/elnee/.conan/data/websocketpp/0.8.2/_/_/package/5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9/include/websocketpp/logger/basic.hpp:67:42: error: expected ‘)’ before ‘*’ token
67 | basic<concurrency,names>(std::ostream * out)
| ~ ^~
| )
/home/elnee/.conan/data/websocketpp/0.8.2/_/_/package/5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9/include/websocketpp/logger/basic.hpp:72:35: error: expected ‘)’ before ‘c’
72 | basic<concurrency,names>(level c, channel_type_hint::value h =
| ~ ^~
| )
/home/elnee/.conan/data/websocketpp/0.8.2/_/_/package/5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9/include/websocketpp/logger/basic.hpp:78:35: error: expected ‘)’ before ‘c’
78 | basic<concurrency,names>(level c, std::ostream * out)
| ~ ^~
| )
/home/elnee/.conan/data/websocketpp/0.8.2/_/_/package/5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9/include/websocketpp/logger/basic.hpp:84:5: error: template-id not allowed for destructor
84 | ~basic<concurrency,names>() {}
| ^
/home/elnee/.conan/data/websocketpp/0.8.2/_/_/package/5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9/include/websocketpp/logger/basic.hpp:87:54: error: expected ‘)’ before ‘const’
87 | basic<concurrency,names>(basic<concurrency,names> const & other)
| ~ ^~~~~~
| )
/home/elnee/.conan/data/websocketpp/0.8.2/_/_/package/5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9/include/websocketpp/logger/basic.hpp:100:54: error: expected ‘)’ before ‘&&’ token
100 | basic<concurrency,names>(basic<concurrency,names> && other)
| ~ ^~~
| )
In file included from /home/elnee/.conan/data/websocketpp/0.8.2/_/_/package/5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9/include/websocketpp/roles/server_endpoint.hpp:31,
from /home/elnee/.conan/data/websocketpp/0.8.2/_/_/package/5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9/include/websocketpp/server.hpp:31,
from /home/elnee/.primebridge/common/include/common/web_socket/web_socket_server.h:6:
/home/elnee/.conan/data/websocketpp/0.8.2/_/_/package/5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9/include/websocketpp/endpoint.hpp:112:5: error: template-id not allowed for destructor
112 | ~endpoint<connection,config>() {}
| ^
/home/elnee/.conan/data/websocketpp/0.8.2/_/_/package/5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9/include/websocketpp/roles/server_endpoint.hpp:75:5: error: template-id not allowed for destructor
75 | ~server<config>() {}
| ^
/home/elnee/.conan/data/websocketpp/0.8.2/_/_/package/5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9/include/websocketpp/roles/server_endpoint.hpp:79:34: error: expected ‘)’ before ‘&’ token
79 | server<config>(server<config> &) = delete;
| ~ ^~
| )
/home/elnee/.conan/data/websocketpp/0.8.2/_/_/package/5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9/include/websocketpp/roles/server_endpoint.hpp:87:34: error: expected ‘)’ before ‘&&’ token
87 | server<config>(server<config> && o) : endpoint<connection<config>,config>(std::move(o)) {}
| ~ ^~~
| )
How we can fix that problem?
from websocketpp.
It is not a real fix but lowering cxx version to c++17 solved this same issue for me
from websocketpp.
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
from websocketpp.
This is a duplicate of #1058 and probably many others.
from websocketpp.
Related Issues (20)
- Process multiple websocket clients in one thread
- memory leak
- how to build in centos7.9? HOT 1
- handle_read_http_response error
- websocketpp how to upload a PDF file to server
- Can't compile the echo_client example
- Help getting basic TLS example to work
- Build error
- Build issues on C++20 (around constructor syntax of templated structs)
- How to add some custom key to the http headers HOT 1
- 严重性 代码 说明 项目 文件 行 禁止显示状态 错误(活动) E0283 不允许使用限定名
- How to use websocketpp to process HTTPS requests?
- May I ask how websocketpp uses domain sockets for communication? HOT 1
- asio/connection.hpp 文件的第 318 行遇到了一个类型不匹配的问题,编译出错 HOT 1
- 服务端150路并发,2m码率的音视频数据发送,造成ping消息延时发送8秒
- Cannot reinit asio after .dll shutdown
- Connect one wss succefully but another failed
- Runs fine on Linux, crash on Windows due to boost invalid memory access issue HOT 2
- How can i turn off utf8_validator for incoming ANSI text message
- request server by ip and set host in header
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from websocketpp.