Skip to content
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

MSVC error C2064 caused by rapidxml.hpp: syntax errors? #834

Open
rjzak opened this issue Aug 30, 2024 · 2 comments
Open

MSVC error C2064 caused by rapidxml.hpp: syntax errors? #834

rjzak opened this issue Aug 30, 2024 · 2 comments

Comments

@rjzak
Copy link

rjzak commented Aug 30, 2024

I'm using Cereal via mlpack, and my project compiles fine on Linux, but with Visual Studio, I'm getting a lot of errors in rapidxml.hpp. Specifically:

error C2059: syntax error: '<parameter-list>' [C:\Users\rjzak\CLionProjects\my-project\cmake-build-release\my-project.vcxproj]
  (compiling source file '../src/mycode.cpp')
      C:\Users\rjzak\CLionProjects\my-project\cmake-build-release\vcpkg_installed\x64-windows\include\cereal\external\rapidxml\rapidxml.hpp(398,23):
      the template instantiation context (the oldest one first) is
          C:\Users\rjzak\CLionProjects\my-project\cmake-build-release\vcpkg_installed\x64-windows\include\cereal\external\rapidxml\rapidxml.hpp(392,11):
          while compiling class template 'cereal::rapidxml::memory_pool'

error C2064: term does not evaluate to a function taking 1 arguments [C:\Users\rjzak\CLionProjects\my-project\cmake-build-release\my-project.vcxproj]
  (compiling source file '../src/mycode.cpp')
      C:\Users\rjzak\CLionProjects\my-project\cmake-build-release\vcpkg_installed\x64-windows\include\cereal\external\rapidxml\rapidxml.hpp(598,38):
      'm_alloc_func': function declaration must be available as none of the arguments depend on a template parameter

Going further, it seems MSVC is complaining about invalid tokens before; in typedef void *(alloc_func)(std::size_t);, and that this type does not specify a function which takes one argument.

image

Details:

  • Windows 10 Pro 22H2
  • MSVC 2022 17
  • C++-20
  • Cereal 1.3.2 via vcpkg
@rjzak
Copy link
Author

rjzak commented Sep 12, 2024

I'm not having this issue anymore, and I don't know why. I must have done something stupid.

@rjzak rjzak closed this as not planned Won't fix, can't repro, duplicate, stale Sep 12, 2024
@rjzak
Copy link
Author

rjzak commented Nov 16, 2024

I'm not sure what to do since this error has resurfaced.

@rjzak rjzak reopened this Nov 16, 2024
@rjzak rjzak changed the title MSVC & rapidxml.hpp: syntax errors? MSVC error C2064 caused by rapidxml.hpp: syntax errors? Nov 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant