Coder Social home page Coder Social logo

Comments (5)

PoetaKodu avatar PoetaKodu commented on July 21, 2024 2

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.

Elnee avatar Elnee commented on July 21, 2024 1

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.

ebalo55 avatar ebalo55 commented on July 21, 2024

It is not a real fix but lowering cxx version to c++17 solved this same issue for me

from websocketpp.

pajlada avatar pajlada commented on July 21, 2024

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.

fw-aaron avatar fw-aaron commented on July 21, 2024

This is a duplicate of #1058 and probably many others.

from websocketpp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.