Use inline variable to simplify C++ API header
Description: The header was originally written for pre C++17, but with C++17 we can just use an inline variable and avoid the template approach.
I was tempted to replace all GetApi() calls with just 'api'. I'd probably leave the 'GetApi()' method as it's documented and people are likely using it for C/C++ interop. No need to break them over one line of header savings.
Motivation and Context A simpler and easier to read public header is always better.
We can't require all our customers using C++17. While we can choose which C++ standard to use for our code, we can't make the decision for our customers.
We can't require all our customers using C++17. While we can choose which C++ standard to use for our code, we can't make the decision for our customers.
Darn, I knew builds required a C++17 compiler. Where do we say the minimum C++ version to include our headers?