-
Notifications
You must be signed in to change notification settings - Fork 9.9k
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
Fix FlatTuple compilation on older msvc. #2569
Conversation
googletest 1.10.0 fails to compile on msvc version 19.00.23917 with one compilation error: src\googletest\include\gtest\internal\gtest-internal.h(1188) : error C2039: 'FlatTupleBase<testing::internal::FlatTuple<bool,bool>,testing::internal::IndexSequence<0,1> >': is not a member of 'testing::internal::FlatTuple<bool,bool>' This PR fixes the compilation error by explicitly specifying the full type that Indices is located in the base type.
@@ -1185,7 +1185,7 @@ struct FlatTupleBase<FlatTuple<T...>, IndexSequence<Idx...>> | |||
|
|||
// Analog to std::tuple but with different tradeoffs. | |||
// This class minimizes the template instantiation depth, thus allowing more | |||
// elements that std::tuple would. std::tuple has been seen to require an | |||
// elements than std::tuple would. std::tuple has been seen to require an | |||
// instantiation depth of more than 10x the number of elements in some | |||
// implementations. | |||
// FlatTuple and ElemFromList are not recursive and have a fixed depth |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"it is" a few lines below should be "is".
"ln" after that should probably be "lg". i.e. log base 2 instead of log base e. Just guessing.
@bgianfo Thank you for the patch. Could you please explain exactly what version of Visual Studio, etc this is? |
@gennadiycivil The MSVC compiler I was using is from Visual Studio 2015, version 14.0. https://en.wikipedia.org/wiki/Microsoft_Visual_C%2B%2B I didn't do an exhaustive test to see at which MSVC version master starts building clean. |
Thank you, we have started internal review. Please don't push any more changes into this PR as they might be overwritten. |
PiperOrigin-RevId: 281321427
PiperOrigin-RevId: 281321427
googletest 1.10.0 fails to compile on msvc version 19.00.23917
with one compilation error:
src\googletest\include\gtest\internal\gtest-internal.h(1188) : error C2039:
'FlatTupleBase<testing::internal::FlatTuple<bool,bool>,testing::internal::IndexSequence<0,1> >':
is not a member of 'testing::internal::FlatTuple<bool,bool>'
This PR fixes the compilation error by explicitly specifying the full type that Indices is
located in the base type.