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

perform type inference on template arguments #352

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Vipul-Cariappa
Copy link
Collaborator

transform template arguments from

    {MyClass<T1, T2>}

to

  {T1, T2}

where the templated function is defined as

  template<class T1, class T2>
  void fn(MyClass<T1, T2> arg);

before instantiation

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
Copy link
Contributor

@github-actions github-actions bot left a 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"
Copy link
Contributor

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};
Copy link
Contributor

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});
Copy link
Contributor

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});
                            ^

Copy link
Contributor

This PR is stale because it has been open for 90 days with no activity.

@github-actions github-actions bot added the stale label Feb 16, 2025
@vgvassilev vgvassilev added to-fix and removed stale labels Feb 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants