A template for defining a registrar.
More...
#include <Registration.hpp>
|
template<typename RegistrarList > |
using | f = Registrant< Args..., RegistrarList > |
|
template<template< typename... > class Registrant, typename... Args>
struct Registration::Registrar< Registrant, Args >
A template for defining a registrar.
A registrar for a class can be defined by making a type alias to this struct, filling in the registrant.
template <typename SomeArg, typename Registrars>
class Derived2;
namespace Registrars {
template <typename SomeArg>
}
template <typename SomeArg,
typename Registrars = tmpl::list<Registrars::Derived2<SomeArg>>>
class Derived2 : public Base<Registrars> {
public:
using options = tmpl::list<>;
int func() const override { return 2; }
};
const char *const String
The string used in option structs.
Definition: String.hpp:8
A template for defining a registrar.
Definition: Registration.hpp:42
In more complex cases (such as with non-type template parameters) defining a registrar manually may be necessary.
template <int N, typename Registrars>
class Derived3;
namespace Registrars {
template <int N>
struct Derived3 {
template <typename RegistrarList>
using f = ::Derived3<N, RegistrarList>;
};
}
template <int N, typename Registrars = tmpl::list<Registrars::Derived3<N>>>
class Derived3 : public Base<Registrars> {
public:
using options = tmpl::list<>;
int func() const override { return N; }
};
The documentation for this struct was generated from the following file:
- src/Utilities/Registration.hpp