- 
                Notifications
    You must be signed in to change notification settings 
- Fork 264
Remove throwing/originating errors in expected scenarios (Lookup/TryLookup and Cancel) #1512
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
          
     Merged
      
      
            DefaultRyan
  merged 21 commits into
  microsoft:master
from
antmor:user/antmor/non_originating
  
      
      
   
  Oct 30, 2025 
      
    
  
     Merged
                    Changes from all commits
      Commits
    
    
            Show all changes
          
          
            21 commits
          
        
        Select commit
          Hold shift + click to select a range
      
      472e8d4
              
                non-originating error compiles
              
              
                antmor e358b92
              
                fix with test cases
              
              
                antmor a6ab125
              
                and remove ignore
              
              
                antmor cefa5fa
              
                add runsettings to run tests from visual studio tester, modified read…
              
              
                antmor a66ecd3
              
                change map shouldOriginate to template parameter. Note, could be a br…
              
              
                antmor 3972237
              
                settle on avoid_originate as naming scheme
              
              
                antmor 72689da
              
                fix errors, more merging
              
              
                antmor 815d734
              
                Merge branch 'microsoft-master' into user/antmor/non_originating
              
              
                antmor dd18558
              
                add a printf only to Lookup so we can add SFINAE or something like that.
              
              
                antmor 0dfa235
              
                weird templating magic required... still not working, has error
              
              
                antmor 3f44814
              
                trylookup exists to avoid throwing an error, and let's avoid avoid_or…
              
              
                antmor cfaa2a6
              
                remove test.
              
              
                antmor e69a7fe
              
                cleaned up and correctness.
              
              
                antmor 7051f24
              
                undo changes to untouched files
              
              
                antmor 7b0072a
              
                spacing changes , change do declval.
              
              
                antmor 783413a
              
                added special tag to parameter list to make sure not to break existin…
              
              
                antmor 18a57a8
              
                address avoid_oritinate comment, no need for a different name, resuse…
              
              
                antmor 2ee9368
              
                change out async to a new name, with it being true by default.
              
              
                antmor 050fa7a
              
                Address hresult comments by adding tests and removing source_locatoin…
              
              
                antmor dc6777e
              
                Merge branch 'master' into user/antmor/non_originating
              
              
                ChrisGuzak 4632e57
              
                add unittest without specialization, make sure that the behaviour is …
              
              
                antmor File filter
Filter by extension
Conversations
          Failed to load comments.   
        
        
          
      Loading
        
  Jump to
        
          Jump to file
        
      
      
          Failed to load files.   
        
        
          
      Loading
        
  Diff view
Diff view
There are no files selected for viewing
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| <?xml version="1.0" encoding="utf-8"?> | ||
| <RunSettings> | ||
| <RunConfiguration> | ||
| <ResultsDirectory>.\TestResults</ResultsDirectory><!-- Path relative to solution directory --> | ||
| <TestSessionTimeout>60000</TestSessionTimeout><!-- Milliseconds --> | ||
| <ForceListContent>true</ForceListContent> | ||
| </RunConfiguration> | ||
|  | ||
| <!-- Adapter Specific sections --> | ||
|  | ||
| <!-- Catch2 adapter --> | ||
| <Catch2Adapter> | ||
| <ExecutionMode>Single</ExecutionMode> | ||
| <FilenameFilter>(?i:Test)</FilenameFilter><!-- Regex filter --> | ||
| <ForceListContent>true</ForceListContent> | ||
| <DebugBreak>on</DebugBreak> | ||
| <IncludeHidden>true</IncludeHidden> | ||
| <Logging>Verbose</Logging> | ||
| <MessageFormat>AdditionalInfo</MessageFormat> | ||
| <StackTraceFormat>ShortInfo</StackTraceFormat> | ||
| <StackTracePointReplacement>,</StackTracePointReplacement> | ||
| <TestCaseTimeout>20000</TestCaseTimeout><!-- 20s in Milliseconds --> | ||
| </Catch2Adapter> | ||
| </RunSettings> | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
      
      Oops, something went wrong.
        
    
  
  Add this suggestion to a batch that can be applied as a single commit.
  This suggestion is invalid because no changes were made to the code.
  Suggestions cannot be applied while the pull request is closed.
  Suggestions cannot be applied while viewing a subset of changes.
  Only one suggestion per line can be applied in a batch.
  Add this suggestion to a batch that can be applied as a single commit.
  Applying suggestions on deleted lines is not supported.
  You must change the existing code in this line in order to create a valid suggestion.
  Outdated suggestions cannot be applied.
  This suggestion has been applied or marked resolved.
  Suggestions cannot be applied from pending reviews.
  Suggestions cannot be applied on multi-line comments.
  Suggestions cannot be applied while the pull request is queued to merge.
  Suggestion cannot be applied right now. Please check back later.
  
    
  
    
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not convinced that we need this. Can we just call TryLookup if it is present and returns
std::optional<T>?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was added at Ryan's suggestion, to make sure that we don't inadvertently create a new compiler error for possible custom IMap implementations that have their own TryLookup implementations that is incompatible with our usage.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
seems very unlikely right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i agreed with his suggestion as since is not a "breaking" change, any code that compiled before this change, should compile after this change. So if a custom IMap has TryLookup(key, extra args) or bool TryLookup(key, outval), we won't break compilation of their code by merely updating their cppwinrt versions.