szaszm commented on a change in pull request #1226:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1226#discussion_r768552299



##########
File path: libminifi/src/core/ProcessSession.cpp
##########
@@ -212,6 +212,10 @@ void ProcessSession::transfer(const 
std::shared_ptr<core::FlowFile> &flow, Relat
 }
 
 void ProcessSession::write(const std::shared_ptr<core::FlowFile> &flow, 
OutputStreamCallback *callback) {
+  gsl_Expects(_updatedFlowFiles.contains(flow->getUUID())
+              || _addedFlowFiles.contains(flow->getUUID())
+              || std::any_of(_clonedFlowFiles.begin(), _clonedFlowFiles.end(), 
[&flow](const auto& cloned_flow_file) { return flow == cloned_flow_file; }));
+

Review comment:
       Consider extracting the lambda to a variable to avoid the error with 
clang. It will start working once they implement the C++20 feature "Lambdas in 
unevaluated contexts".
   This is the disabled implementation of the macro:
   ```
   # define gsl_ELIDE_( x )  static_assert( ::std::is_constructible<bool, 
decltype( x )>::value, "argument of contract check must be convertible to bool" 
)
   ```
   




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to