Skip to content

Commit

Permalink
Assert on a RegisterableModule being registered in the StaticModule t…
Browse files Browse the repository at this point in the history
…emplate.
  • Loading branch information
codereader committed Feb 3, 2020
1 parent 0c7357f commit b3c5d73
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions radiant/modulesystem/StaticModule.h
Expand Up @@ -24,6 +24,8 @@ namespace module
template <class ModuleType>
class StaticModule
{
static_assert(std::is_base_of<RegisterableModule, ModuleType>::value, "ModuleType must be of type RegisterableModule");

// Define a std::shared_ptr for the given class type
typedef std::shared_ptr<ModuleType> ModuleTypePtr;
std::string _moduleName;
Expand Down

0 comments on commit b3c5d73

Please sign in to comment.