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

compiler error in rapidjson/document.h #130

Closed
maxaehle opened this issue Nov 14, 2024 · 3 comments
Closed

compiler error in rapidjson/document.h #130

maxaehle opened this issue Nov 14, 2024 · 3 comments

Comments

@maxaehle
Copy link

When I try to compile davix as part of ROOT, I get the following error message related to document.h:319:

/..../root/build/builtins/davix/DAVIX-prefix/src/DAVIX/src/libs/rapidjson/document.h: In member function ‘rapidjson::GenericStringRef<CharType>& rapidjson::GenericStringRef<CharType>::operator=(const rapidjson::GenericStringRef<CharType>&)’:
/..../root/build/builtins/davix/DAVIX-prefix/src/DAVIX/src/libs/rapidjson/document.h:319:82: error: assignment of read-only member ‘rapidjson::GenericStringRef<CharType>::length’
  319 |     GenericStringRef& operator=(const GenericStringRef& rhs) { s = rhs.s; length = rhs.length; }
      |                                                                           ~~~~~~~^~~~~~~~~~~~

I agree that the line looks strange, length is a const SizeType member and should not be assigned. Also, I wonder if the missing return statement could create bugs.

@maxaehle
Copy link
Author

the error comes up with GCC 14.2.0, but not with GCC 8.5.0

@maxaehle
Copy link
Author

maxaehle commented Dec 3, 2024

GCC 13.2.0 compiles the code as well.

The issue is related to an out-of-date version of RapidJSON. This has partially been addressed in #120, allowing to specify a more up to date version of RapidJSON.

@mpatrascoiu mpatrascoiu changed the title compiler error in document.h compiler error in rapidjson/document.h Dec 4, 2024
@mpatrascoiu
Copy link
Contributor

Closed by pull-request #129 (Remove non-compiling assignment operator)

Further tracking will be done here: DMC-1426 / DMC-1427

Given there are a couple of things pending in the current devel branch, I think I'll do a Davix R_0_8_8 release this side of the New Year.

Cheers,
Mihai

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

2 participants