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

Ensure FlutterDesktopViewControllerState declares default destructor #428

Merged
merged 1 commit into from
Oct 30, 2024

Conversation

lhoward
Copy link
Contributor

@lhoward lhoward commented Oct 30, 2024

types containing std::unique_ptr to incomplete types require a destructor to be defined as the size is unavailable, otherwise the following error is raised at compile time:

/usr/lib/gcc/aarch64-linux-gnu/13/../../../../include/c++/13/bits/unique_ptr.h:97:16: error: invalid application of 'sizeof' to an incomplete type 'flutter::FlutterELinuxView'
  91 |       _GLIBCXX23_CONSTEXPR
  92 |       void
  93 |       operator()(_Tp* __ptr) const
     |       `- note: in instantiation of member function 'std::default_delete<flutter::FlutterELinuxView>::operator()' requested here
  94 |       {
  95 | 	static_assert(!is_void<_Tp>::value,
  96 | 		      "can't delete pointer to incomplete type");
  97 | 	static_assert(sizeof(_Tp)>0,
     |                `- error: invalid application of 'sizeof' to an incomplete type 'flutter::FlutterELinuxView'
  98 | 		      "can't delete pointer to incomplete type");
  99 | 	delete __ptr;

types containing std::unique_ptr to incomplete types require a destructor to be
defined as the size is unavailable, otherwise the following error is raised at
compile time:

/usr/lib/gcc/aarch64-linux-gnu/13/../../../../include/c++/13/bits/unique_ptr.h:97:16: error: invalid application of 'sizeof' to an incomplete type 'flutter::FlutterELinuxView'
  91 |       _GLIBCXX23_CONSTEXPR
  92 |       void
  93 |       operator()(_Tp* __ptr) const
     |       `- note: in instantiation of member function 'std::default_delete<flutter::FlutterELinuxView>::operator()' requested here
  94 |       {
  95 | 	static_assert(!is_void<_Tp>::value,
  96 | 		      "can't delete pointer to incomplete type");
  97 | 	static_assert(sizeof(_Tp)>0,
     |                `- error: invalid application of 'sizeof' to an incomplete type 'flutter::FlutterELinuxView'
  98 | 		      "can't delete pointer to incomplete type");
  99 | 	delete __ptr;

Signed-off-by: Luke Howard <[email protected]>
Copy link
Contributor

@HidenoriMatsubayashi HidenoriMatsubayashi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thank you for sending this PR.

@HidenoriMatsubayashi HidenoriMatsubayashi merged commit a938f2b into sony:master Oct 30, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants