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

Mismatch in constness types #2

Open
ckrd-mark opened this issue Oct 4, 2023 · 0 comments
Open

Mismatch in constness types #2

ckrd-mark opened this issue Oct 4, 2023 · 0 comments

Comments

@ckrd-mark
Copy link
Collaborator

Work around cxx and autocxx choking on mismatch in constness types - assumes google/autocxx#799 & dtolnay/cxx#850 are unresolved.

  • the header signature:

    const std::shared_ptr<const EncryptedArray>& shareEA() const { return ea; }
    
  • the generated code

      ::std::shared_ptr<::helib::EncryptedArray> const *helib$cxxbridge1$Context$shareEA(::helib::Context const &self) noexcept {
        ::std::shared_ptr<::helib::EncryptedArray> const &(::helib::Context::*shareEA$)() const = &::helib::Context::shareEA;
        return &(self.*shareEA$)();
      }
    
  • the error

    gen0.cxx:3218:93: error: cannot convert ‘const std::shared_ptr<const helib::EncryptedArray>& (helib::Context::*)() const’ to ‘const std::shared_ptr<helib::EncryptedArray>& (helib::Context::*)() const’ in initialization
    
    cargo:warning= 3218 |   ::std::shared_ptr<::helib::EncryptedArray> const &(::helib::Context::*shareEA$)() const = &::helib::Context::shareEA;
    
    cargo:warning=      |                                                                                             ^~~~~~~~~~~~~~~~~~~~~~~~~~
    
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