Skip to content

Commit

Permalink
Add deduction guides to support compilers with ctad-maybe-unsupported…
Browse files Browse the repository at this point in the history
… warning enabled (envoyproxy#28631)

Signed-off-by: Yan Avlasov <yavlasov@google.com>
  • Loading branch information
yanavlasov committed Jul 26, 2023
1 parent a3d36dd commit ae161a3
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
11 changes: 11 additions & 0 deletions test/extensions/common/async_files/mocks.h
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,17 @@ class MockAsyncFileManagerFactory : public Extensions::Common::AsyncFiles::Async
Api::OsSysCalls* substitute_posix_file_operations));
};

// Add deduction guides for comping with the ctad-maybe-unsupported warning
TypedMockAsyncFileAction(std::function<void(absl::Status)>)
->TypedMockAsyncFileAction<std::function<void(absl::Status)>>;
TypedMockAsyncFileAction(std::function<void(absl::StatusOr<Buffer::InstancePtr>)>)
->TypedMockAsyncFileAction<std::function<void(absl::StatusOr<Buffer::InstancePtr>)>>;
TypedMockAsyncFileAction(std::function<void(absl::StatusOr<size_t>)>)
->TypedMockAsyncFileAction<std::function<void(absl::StatusOr<size_t>)>>;
TypedMockAsyncFileAction(std::function<void(absl::StatusOr<std::shared_ptr<AsyncFileContext>>)>)
->TypedMockAsyncFileAction<
std::function<void(absl::StatusOr<std::shared_ptr<AsyncFileContext>>)>>;

} // namespace AsyncFiles
} // namespace Common
} // namespace Extensions
Expand Down
1 change: 1 addition & 0 deletions tools/spelling/spelling_dictionary.txt
Original file line number Diff line number Diff line change
Expand Up @@ -632,6 +632,7 @@ cryptographic
cryptographically
cstate
cstring
ctad
ctor
ctrl
customizations
Expand Down

0 comments on commit ae161a3

Please sign in to comment.