[Bug]: MSVC ElementsAreArray compilation errors #4546
Replies: 2 comments 3 replies
-
Your function argument is Already for security reasons I would highly recommend you to change the signature to something that allows the callee to know the size of the argument, at the same time that would fix your problem.
|
Beta Was this translation helpful? Give feedback.
-
Hello, I got the same issue as @robjinman but you said that
The documentation is incorrect in this section:
So, this is a bug as per the documentation. Also, I tried your solution, and it also doesn't compile on my end. With the following compile error:
|
Beta Was this translation helpful? Give feedback.
-
Describe the issue
Use of ElementsAreArray causes compilation errors on Windows with MSVC.
As far as I can tell, I'm doing exactly what is written in the online documentation.
A minimal example
Here is the compiler output
Steps to reproduce the problem
src/main.cpp
src/foo_test.cpp
CMakeLists.txt
Build commands
Run in powershell
What version of GoogleTest are you using?
1.14.0
What operating system and version are you using?
Windows 11 Enterprise 10.0.22621 Build 22621
What compiler and version are you using?
MSBuild version 17.9.5+33de0b227 for .NET Framework
What build system are you using?
cmake version 3.28.1
Additional context
No response
Beta Was this translation helpful? Give feedback.
All reactions