On Fri Aug 25 06:09:12 2023 +0000, Chip Davis wrote:
From the looks of it, it looks like by using the templates, you are
trying to overload the functions so it might be worth noting that by using templates you change the syntax used for calling the method to something like `Getfactory<int>(ppv)` . I am not sure this is a desired effect or a side effect of using the templates hence I am noting. In C++, you do not need to specify function template arguments if the compiler can infer them from the function arguments. And if *all* the template arguments can be inferred, you can elide the angled brackets entirely. If you had a valid `IDXCoreAdapter* adapter;` pointer and an `IDXCoreAdapterFactory* factory;` declaration, the call, then, would just be `adapter->GetFactory(&factory)` in the code. This simplified syntax is the whole point of the helper method templates.
Yeah, it's as Chip said, this is one of the benefits of using C++ over C.