Skip to content

operator= in Wrapped.hpp produces deprecated warnings #1995

Closed

Description

@ghuser404

Godot version

4.6.3-stable

godot-cpp version

10.0.0-rc1

System information

Windows 11

Issue description

The assignment operator void operator=(const m_class &p_rval) {} in GDEXTENSION_CLASS_ALIAS, which is used to create Godot classes, produces deprecated warnings in MinGW. For devs using -Werror this fails the build.

error: implicitly-declared 'constexpr godot::SpriteFrames::SpriteFrames(const godot::SpriteFrames&)' is deprecated [-Werror=deprecated-copy]

I know it's strange, because I'm not really trying to copy godot::SpriteFrames, but rather this error comes from some reflection magic.

The fix it very simple, since the function is private and is defined as {}, marking it = delete; fixes the warning.

void operator=(const m_class &p_rval) = delete;

Steps to reproduce

N/A

Minimal reproduction project

N/A

Activity

  1. changed the title [-]`void operator=(const m_class & /*p_rval*/) {}`[/-] [+]operator= in Wrapped.h causes deprecated warnings[/+] on May 30, 2026
  2. changed the title [-]operator= in Wrapped.h causes deprecated warnings[/-] [+]operator= in Wrapped.hpp causes deprecated warnings[/+] on May 30, 2026
  3. changed the title [-]operator= in Wrapped.hpp causes deprecated warnings[/-] [+]operator= in Wrapped.hpp priduces deprecated warnings[/+] on May 30, 2026
  4. changed the title [-]operator= in Wrapped.hpp priduces deprecated warnings[/-] [+]operator= in Wrapped.hpp produces deprecated warnings[/+] on May 30, 2026
  5. added
    bug
    on Jul 25, 2026
  6. added this to the 10.x milestone on Jul 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions