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

Workaround build error(C3546) in vs2022(v17.11.2) #107

Merged
merged 2 commits into from
Sep 20, 2024
Merged

Workaround build error(C3546) in vs2022(v17.11.2) #107

merged 2 commits into from
Sep 20, 2024

Conversation

Y-way
Copy link
Contributor

@Y-way Y-way commented Sep 4, 2024

No description provided.

@LanderlYoung
Copy link
Collaborator

LanderlYoung commented Sep 6, 2024

Thanks for the PR.

For the error

Please leave detailed information about the error.

  1. what is the cause
  2. how to reproduce (a link on Compiler Explore would be appreciated)

discussion

AFAIK, it seems to be a bug in MSVC
https://developercommunity.visualstudio.com/t/MSVC-compiler-bug---parameter-pack-expan/10419008?q=intellisense&sort=newest
mlpack/mlpack#1603

If so, would upgrading Visual Studio be a workaround?

further

The helper template type_t accepts the template parameter pack. It is better to change to:

template <typename... T>
inline internal::type_t<Local<Value>, decltype(&internal::TypeConverter<T>::toScript)...>

@Y-way
Copy link
Contributor Author

Y-way commented Sep 9, 2024

cmake version is 3.29.3 and VisualStudio 2022 is the latest version on my computer.
step 1 clone ScriptX from remote.
step 2 cd path/to/ScriptX/test
step 3 do the command: cmake -S . -B .\build
step 4 cd the path/to/ScriptX/test/buld, and open the solution file ScriptXUnitTests.sln with vs2022
step 5 building the UnitTest project,it will occur error.

image

@LanderlYoung
Copy link
Collaborator

Still, I recommend finding the real problem.

Please leave your MSVC version.

I created a minimal demo in Compiler Explorer, but couldn't reproduce this problem.

Here is the link: https://compiler-explorer.com/z/MTq4z9T6z

@Y-way
Copy link
Contributor Author

Y-way commented Sep 11, 2024

Still, I recommend finding the real problem.

Please leave your MSVC version.

I created a minimal demo in Compiler Explorer, but couldn't reproduce this problem.

Here is the link: https://compiler-explorer.com/z/MTq4z9T6z

I have no idea.maybe it's a bug in the msvc compiler.

@LanderlYoung
Copy link
Collaborator

This issue is reproduced in GitHub Actions, merge to workaround.

TODO: Need some code optimization.

@LanderlYoung LanderlYoung changed the title Fixed build error(C3546) in vs2022(v17.11.2) Workaround build error(C3546) in vs2022(v17.11.2) Sep 20, 2024
@LanderlYoung LanderlYoung merged commit dc54e7f into Tencent:main Sep 20, 2024
40 checks passed
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

Successfully merging this pull request may close these issues.

2 participants