Compiler Error C2280 with std::dynamic_pointer_cast (/GR-)

Open
#594 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
25/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
cpp
Domain
compilers

Research direction

Start by reproducing the reported C2280 error while compiling the Xbox Live API with /GR- and locate the uses of std::dynamic_pointer_cast involved. Determine whether those casts can be changed without altering behavior, then verify that the affected compilation succeeds with /GR-.

Written by the indexing model from the issue text.

Description

Hello,

I encounter compiler error C2280 when trying compiling with /GR- (need to change it to /GR).
Severity Code Description Project File Line Suppression State
Error C2280 'std::shared_ptr<_Ty> std::dynamic_pointer_cast<... &&) noexcept': attempting to reference a deleted function

The issue is std::dynamic_pointer_cast need /GR, could you please advise me if all std::dynamic_pointer_cast could be removed (they seems to cast to the same class or base class)?
TBH, I don't understand why do we need std::dynamic_pointer_cast...

Best Regards,
Khai

Dominant language
C++
Stars
390
Forks
118
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from microsoft/xbox-live-api

All issues in microsoft/xbox-live-api

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.