Skip to content

Clang-tidy 19+ error #2407

Open
Open

Description

@robdeckers

2: /usr/include/rapidjson/document.h:319:82: error: cannot assign to non-static data member 'length' with const-qualified type 'const SizeType' (aka 'const unsigned int') [clang-diagnostic-error]
2: 319 | GenericStringRef& operator=(const GenericStringRef& rhs) { s = rhs.s; length = rhs.length; }
2: | ~~~~~~ ^
2: /usr/include/rapidjson/document.h:325:20: note: non-static data member 'length' declared const here
2: 325 | const SizeType length; //!< length of the string (excluding the trailing NULL terminator)
2: | ~~~~~~~~~~~~~~~^~~~~~

From Claude Opus 5.5:

  1. The rapidjson error in agx_shared, still failing. Ubuntu's rapidjson-dev 1.1.0 has a broken GenericStringRef::operator= (it assigns to a const member). GCC accepts it, but clang 19 and newer reject it as a hard error, and no flag or NOLINT can suppress it.

Activity

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions