Commit 918444cb authored by Ned Coltman's avatar Ned Coltman
Browse files

Merge branch 'cherry-pick-ac5e8f9c' into 'releases/3.2'

Merge branch 'feature/pedantic-semicolon' into 'master'

See merge request !2114
parents 7b93a9c8 be739ad9
......@@ -36,11 +36,16 @@
* DUMUX_REGISTER_PRECONDITIONER("mypreconditioner", Dumux::MultiTypeBlockMatrixPreconditionerTag, Dune::defaultPreconditionerBlockLevelCreator<Dumux::MyPreconditioner, 1>());
* Expicitly specifying the namespaces is required.
* Set parameter Preconditioner.Type to "mypreconditioner" to use it through the factory.
* In the macro implementation, the final static_assert forces implementers
* to put a semicolon after every DUMUX_REGISTER_PRECONDITIONER macro call (cf. example)
* and avoids a compiler warning for an empty line semicolon at the same time
#define DUMUX_REGISTER_PRECONDITIONER(name, tag, ...) \
} namespace Dune { \
DUNE_REGISTRY_PUT(tag, name, __VA_ARGS__); \
} namespace Dumux { \
static_assert(true, "Require semicolon after macro call")
namespace Dumux {
namespace {
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment