Re-work OrtApi struct to satisfy C++20 compilers (#15183)

### Description
<!-- Describe your changes. -->
Remove `deletion` of copy functions from `OrtApi` as its initialization
no longer compiles in C++20.
Introduce a non-copyable member to implicitly delete copy ctor.

### Motivation and Context
<!-- - Why is this change required? What problem does it solve?
- If it fixes an open issue, please link to the issue here. -->
Inspired by https://github.com/microsoft/onnxruntime/pull/14901

Solution credits: @RyanUnderhill 

Cc: @georgthegreat
This commit is contained in:
Dmitri Smirnov 2023-03-24 13:52:17 -07:00 committed by GitHub
parent dc87691000
commit 2de15c5d50
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -4086,10 +4086,6 @@ struct OrtApi {
* \since Version 1.15.
*/
ORT_API2_STATUS(KernelInfoGetConstantInput_tensor, _In_ const OrtKernelInfo* info, size_t index, _Out_ int* is_constant, _Outptr_ const OrtValue** out);
#ifdef __cplusplus
OrtApi(const OrtApi&) = delete; // Prevent users from accidentally copying the API structure, it should always be passed as a pointer
#endif
};
/*