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

Incorrect [deleted] specification in member list when some of the functions are deleted #835

Open
anarthal opened this issue Jan 30, 2025 · 1 comment

Comments

@anarthal
Copy link

When some (but not all) of the functions are deleted, the function is rendered in the member list as deleted. This transmits that all functions are deleted, when they are not:

namespace boost::mysql {

struct move_only
{
    /// The copy assignment operator is deleted.
    move_only& operator=(const move_only&) = delete;

    /// Move assignment.
    move_only& operator=(move_only&&) = default;
};

}  // namespace boost::mysql

Image

If the deleted function is not documented, the effects are more noticeable:

namespace boost::mysql {

struct move_only
{
    move_only& operator=(const move_only&) = delete;

    /// Move assignment.
    move_only& operator=(move_only&&) = default;
};

}  // namespace boost::mysql

Image

I think the [deleted] specification would make more sense to be included only if all of the functions were deleted.

@anarthal
Copy link
Author

Adding to this: it looks like the [deleted] specification is added only if the first member function in the overload list is deleted. The issue can be workarounded by moving the deleted function to not be the first one declared.

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

No branches or pull requests

1 participant