Commit ac5e8f9c authored by Timo Koch's avatar Timo Koch
Browse files

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

Fix warning after DUMUX_REGISTER_PRECONDITIONER superfluous semicolon

Occurs only with pedantic

Needs backport to 3.2

See merge request !2110
parents f70d30c3 74c7caa7
......@@ -35,11 +35,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 { \
} 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