Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Conversation

@dkwingsmt
Copy link
Contributor

@dkwingsmt dkwingsmt commented Jan 29, 2024

The number of arguments are not used.

And also, even if we need it in the future, they can be derived at compile time:

template <typename T>
struct function_traits;

template <typename Ret, typename... Args>
struct function_traits<Ret(Args...)>
{
    using params = std::tuple<Args...>;
};

template <typename T>
constexpr std::size_t get_parameter_count() {
    return std::tuple_size<typename function_traits<T>::params>::value;
}

template <typename T>
struct member_function_traits;

template <typename C, typename Ret, typename... Args>
struct member_function_traits<Ret(C::*)(Args...)>
{
    using params = std::tuple<Args...>;
};

template <typename T>
constexpr std::size_t get_member_function_parameter_count() {
    return std::tuple_size<typename member_function_traits<T>::params>::value;
}

(I got the code above with ChatGPT but I verified that they work)

Pre-launch Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I read and followed the Flutter Style Guide and the C++, Objective-C, Java style guides.
  • I listed at least one issue that this PR fixes in the description above.
  • I added new tests to check the change I am making or feature I am adding, or the PR is test-exempt. See testing the engine for instructions on writing and running engine tests.
  • I updated/added relevant documentation (doc comments with ///).
  • I signed the CLA.
  • All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel on Discord.

@flutter-dashboard
Copy link

It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact "@test-exemption-reviewer" in the #hackers channel in Chat (don't just cc them here, they won't see it! Use Discord!).

If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix?

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing.

@dkwingsmt dkwingsmt added the autosubmit Merge PR when tree becomes green via auto submit App label Feb 1, 2024
@auto-submit auto-submit bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Feb 1, 2024
@auto-submit
Copy link
Contributor

auto-submit bot commented Feb 1, 2024

auto label is removed for flutter/engine/50153, due to - The status or check suite Linux Framework Smoke Tests has failed. Please fix the issues identified (or deflake) before re-applying this label.

@dkwingsmt dkwingsmt added the autosubmit Merge PR when tree becomes green via auto submit App label Feb 1, 2024
@auto-submit auto-submit bot merged commit e61d08a into flutter:main Feb 1, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Feb 2, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Feb 2, 2024
auto-submit bot pushed a commit to flutter/flutter that referenced this pull request Feb 2, 2024
…142783)

flutter/engine@dd4c79a...b35153d

2024-02-02 skia-flutter-autoroll@skia.org Manual roll Dart SDK from 82936dcdaf4f to 5a5d4c262200 (2 revisions) (flutter/engine#50264)
2024-02-01 dkwingsmt@users.noreply.github.com Remove number of arguments from defining Dart FFI (flutter/engine#50153)
2024-02-01 32242716+ricardoamador@users.noreply.github.com Refactor the linux_android targets to make use of recent changes to android virtual device params (flutter/engine#50099)
2024-02-01 goderbauer@google.com Re-add tests deleted on accident (flutter/engine#50223)
2024-02-01 30870216+gaaclarke@users.noreply.github.com [Impeller] updated todos from opengles golden work (flutter/engine#50218)
2024-02-01 flar@google.com Get bounds from RTree in DLBuilder::Build() (flutter/engine#50253)
2024-02-01 chinmaygarde@google.com [Impeller] Remove unused define. (flutter/engine#50250)
2024-02-01 tugorez@users.noreply.github.com Add the focus state related methods to the platform dispatcher (flutter/engine#49841)
2024-02-01 jason-simmons@users.noreply.github.com Fix the output paths of the Web esbuild GN template (flutter/engine#50188)
2024-02-01 chinmaygarde@google.com [Impeller] Delete unnecessary special casing for Vulkan in framebuffer fetch. (flutter/engine#50251)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-engine-flutter-autoroll
Please CC matanl@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

autosubmit Merge PR when tree becomes green via auto submit App

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants