Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix for
SST_ELI_DECLARE_NEW_BASE
when BuilderInfo
is a dependent …
…name. (#1006) This is easier to describe with an example first. Imagine the following code: ```c++ template <class Component> struct MyComponentBase : public Component { SST_ELI_DECLARE_NEW_BASE(Component, MyComponentBase); // tools that help us with SST::Component interfaces }; struct MyComponent : MyComponentBase<SST::Component> { // A custom component }; struct MyRouter : MyComponentBase<SST::Merlin::Router> { // A merlin router implementation }; ``` In this context, inside the `SST_ELI_DECLARE_NEW_BASE`, the `BuilderInfo` is a dependent name in the `addDerivedInfo` template function, and can't be found without qualification. The qualified name is `__LocalEliBase::BuilderInfo` and it needs a `typename` pre-C++20. This patch adds that typename to support this template pattern. This pattern allows us to write utility code that can be injected into _any_ component hierarchy.
- Loading branch information