Skip to content

Conversation

@SergiusTheBest
Copy link
Member

So we can use something smarter than a plain NTSTATUS as a return type.

So we can use something smarter than a plain NTSTATUS as a return type.
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR enhances the ScopeFailure utility to accept types that are convertible to NTSTATUS, rather than requiring plain NTSTATUS. This allows for more sophisticated return type patterns while maintaining backward compatibility with existing NTSTATUS usage.

Key Changes

  • Templated ScopeFailure and MakeScopeFailure classes to accept any type convertible to NTSTATUS using C++20 concepts
  • Added explicit return type annotation to a lambda in FltCommunicationPort.h for clarity

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
include/kf/ScopeFailure.h Added template parameter T with std::convertible_to<T, NTSTATUS> constraint to both ScopeFailure and MakeScopeFailure classes, replacing direct NTSTATUS usage
include/kf/FltCommunicationPort.h Added explicit -> NTSTATUS return type annotation to lambda for type clarity

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@SergiusTheBest SergiusTheBest merged commit 9b5ba56 into main Dec 19, 2025
2 checks passed
@SergiusTheBest SergiusTheBest deleted the support-of-convertible-to-NTSTATUS branch December 19, 2025 17:00
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

Successfully merging this pull request may close these issues.

2 participants