mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-05-29 23:06:41 +00:00
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:
parent
dc87691000
commit
2de15c5d50
1 changed files with 0 additions and 4 deletions
|
|
@ -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
|
||||
};
|
||||
|
||||
/*
|
||||
|
|
|
|||
Loading…
Reference in a new issue