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

Getting issue in nullable.hpp file while integrating the azure sdk for cpp into our application #5634

Open
yashshah-22 opened this issue May 17, 2024 · 6 comments
Assignees
Labels
Azure.Core Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. needs-author-feedback More information is needed from author to address the issue. no-recent-activity There has been no recent activity on this issue. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that
Milestone

Comments

@yashshah-22
Copy link

Query/Question
Getting issue
Error C2556 'int64_t *Azure::Nullable<int64_t>::operator ->(void) const': overloaded function differs only by return type from 'const int64_t *Azure::Nullable<int64_t>::operator ->(void) const' (compiling source file login.cpp) in file nullable.hpp while integrating azure sdk into our project.I have not made any changes in the file still getting the errors.

In login.cpp I have used header files
#include<azure/identity.hpp>
#include<azure/core.hpp>

Why is this not a Bug or a feature Request?

The problem could be resolved by adjusting the implementation to avoid overloading based only on return type. This typically involves refactoring the function signatures or ensuring that only one version of operator-> exists.

Setup (please complete the following information if applicable):

  • OS: Windows
  • IDE : Visual Studio Community 2015
@github-actions github-actions bot added Azure.Core Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. needs-team-attention This issue needs attention from Azure service team or SDK team question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels May 17, 2024
Copy link

Thank you for your feedback. Tagging and routing to the team member best able to assist.

@LarryOsterman
Copy link
Member

I'm a tad confused. Based on my reading of the source code, there are two different declarations of the operator-> method.

At line 281, we have:

  constexpr const T* operator->() const { return std::addressof(m_value); }

which applies to const Nullable values.

At line 291 we have:

  constexpr T* operator->() { return std::addressof(m_value); }

which applies to Nullable values (mutable or non-const). So there shouldn't be any ambiguities in the implementation.

Your bug report doesn't indicate which line is upsetting the compiler, so it's hard to fully understand what is causing challenges.

If it is possible to build a stand-alone reproduction of the problem, it would help a great deal in understanding the problem.

I did notice that you are using a rather old version of Visual Studio community edition (2015). We don't include this version of the compiler in our tests because it is a fairly old version of the compiler.

Would it be possible to try this on a newer version of Visual Studio? There have been many language compliance related changes made to Visual Studio over the past 8 years which may be affecting your code.

@yashshah-22
Copy link
Author

Yes , I will try with Visual Studio 2022 and let you know . Thanks!!!!!

@ahsonkhan ahsonkhan added needs-author-feedback More information is needed from author to address the issue. and removed needs-team-attention This issue needs attention from Azure service team or SDK team labels May 21, 2024
Copy link

Hi @yashshah-22. Thank you for opening this issue and giving us the opportunity to assist. To help our team better understand your issue and the details of your scenario please provide a response to the question asked above or the information requested above. This will help us more accurately address your issue.

@LarryOsterman
Copy link
Member

@yashshah-22, apparently our bot didn't notice you had replied - feel free to ignore that :).

Looking forward to your update.

Copy link

Hi @yashshah-22, we're sending this friendly reminder because we haven't heard back from you in 7 days. We need more information about this issue to help address it. Please be sure to give us your input. If we don't hear back from you within 14 days of this comment the issue will be automatically closed. Thank you!

@github-actions github-actions bot added the no-recent-activity There has been no recent activity on this issue. label May 29, 2024
@RickWinter RickWinter added this to the Backlog milestone Jun 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Azure.Core Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. needs-author-feedback More information is needed from author to address the issue. no-recent-activity There has been no recent activity on this issue. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that
Projects
None yet
Development

No branches or pull requests

5 participants