-
Notifications
You must be signed in to change notification settings - Fork 27
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
perform type inference on template arguments #352
base: main
Are you sure you want to change the base?
perform type inference on template arguments #352
Conversation
transform template arguments from {MyClass<T1, T2>} to {T1, T2} where templated function is defined as template<class T1, class T2> void fn(MyClass<T1, T2> arg); before instantiation
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.
clang-tidy made some suggestions
@@ -8,6 +8,7 @@ | |||
#include "gtest/gtest.h" |
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.
warning: 'gtest/gtest.h' file not found [clang-diagnostic-error]
#include "gtest/gtest.h"
^
|
||
int x = 2; | ||
double y = 4.0; | ||
void* args0[2] = {(void*)&x, (void*)&y}; |
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.
warning: do not declare C-style arrays, use std::array<> instead [cppcoreguidelines-avoid-c-arrays]
void* args0[2] = {(void*)&x, (void*)&y};
^
double y = 4.0; | ||
void* args0[2] = {(void*)&x, (void*)&y}; | ||
void* tuple = new std::tuple<int, double>; | ||
make_tuple.Invoke(tuple, {args0, 2}); |
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.
warning: do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead [cppcoreguidelines-pro-bounds-array-to-pointer-decay]
make_tuple.Invoke(tuple, {args0, 2});
^
This PR is stale because it has been open for 90 days with no activity. |
transform template arguments from
to
where the templated function is defined as
before instantiation