You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
error C2977: 'std::tuple' : too many template arguments
I've googled the error message, and according to the stackoverflow post, I added the following preprocessor to all cppformat projects:
_VARIADIC_MAX=10
and then it compiled successfully.
I wonder is it a good idea for the project maintainers add the above preprocessor to the default CMakefile.txt when CMake found that the build environment is MSVC11?
The text was updated successfully, but these errors were encountered:
Thanks for your quick patch. But I'm afraid your patch doesn't work for me.
I replaced your modified CMakeLists.txt and tested the following cmake command:
cmake "C:\Absolute path of cppformat source directory"
But I failed to compile the solution again with the same compilation error.
I roughly glanced at the build-in implementation of std::tuple<> in MSVC11, it uses macro to expand the number to template parameters (MSVC11 seems not able to fully support variadic templates). The default max supported number of template parameters in my environment is 8, so the compiler complained 'std::tuple' : too many template arguments only when the number of template parameter exceeded 8 (Line 9741 in cppformat/gmock/gtest/gtest.h)
When compiling in MSVC11, the compiler said:
I've googled the error message, and according to the stackoverflow post, I added the following preprocessor to all cppformat projects:
and then it compiled successfully.
I wonder is it a good idea for the project maintainers add the above preprocessor to the default
CMakefile.txt
when CMake found that the build environment is MSVC11?The text was updated successfully, but these errors were encountered: