Each material spends roughly 40 lines declaring parameters:
para.template insert<indices>("indices").template add<is_required>();
and again reading them with base::template get_parameter<T>("k").
A free helper required<T>(para, "k") (and optional<T>(para, "k", default)) was tried during review and works; using base::add_output does not, because of the dependent-name lookup.
Purely additive: existing materials keep compiling, new ones get shorter, and the .template noise disappears from the code a material author has to write. It is also the natural place to attach check_data_type and range<> once, see the parameter-diagnostics issue.
All references are to main at 91bd26f.
Each material spends roughly 40 lines declaring parameters:
and again reading them with
base::template get_parameter<T>("k").A free helper
required<T>(para, "k")(andoptional<T>(para, "k", default)) was tried during review and works;using base::add_outputdoes not, because of the dependent-name lookup.Purely additive: existing materials keep compiling, new ones get shorter, and the
.templatenoise disappears from the code a material author has to write. It is also the natural place to attachcheck_data_typeandrange<>once, see the parameter-diagnostics issue.All references are to
mainat 91bd26f.