Skip to content

Commit

Permalink
Added [[maybe_unused]] to __Eli_Derived_Level at suggestion of @ldalessa
Browse files Browse the repository at this point in the history
  • Loading branch information
feldergast committed Jun 10, 2024
1 parent ac168c5 commit 0cfa156
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions src/sst/core/eli/elementinfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -405,14 +405,15 @@ SST_ELI_getTertiaryNumberFromVersion(SST_ELI_element_version_extraction ver)
// this class. Sny local information will overwrite any inherited
// information. See comment for SST_ELI_DECLARE_BASE in elibase.h for
// info on how __EliDerivedLevel is used.
#define SST_ELI_REGISTER_DERIVED(base, cls, lib, name, version, desc) \
static constexpr int __EliDerivedLevel = std::is_same<base, cls>::value ? __EliBaseLevel : __EliBaseLevel + 1; \
static bool ELI_isLoaded() \
{ \
return SST::ELI::InstantiateBuilder<base, cls>::isLoaded() && \
SST::ELI::InstantiateBuilderInfo<base, cls>::isLoaded(); \
} \
SST_ELI_FORCE_INSTANTIATION(base, cls) \
#define SST_ELI_REGISTER_DERIVED(base, cls, lib, name, version, desc) \
[[maybe_unused]] static constexpr int __EliDerivedLevel = \
std::is_same<base, cls>::value ? __EliBaseLevel : __EliBaseLevel + 1; \
static bool ELI_isLoaded() \
{ \
return SST::ELI::InstantiateBuilder<base, cls>::isLoaded() && \
SST::ELI::InstantiateBuilderInfo<base, cls>::isLoaded(); \
} \
SST_ELI_FORCE_INSTANTIATION(base, cls) \
SST_ELI_DEFAULT_INFO(lib, name, ELI_FORWARD_AS_ONE(version), desc)

#define SST_ELI_REGISTER_EXTERN(base, cls) \
Expand Down

0 comments on commit 0cfa156

Please sign in to comment.