Commit 35072f7d authored by Timo Koch's avatar Timo Koch
Browse files

[doc] Add documentation for the semicolon fix

parent 43c9d0d8
......@@ -35,13 +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 { \
static_assert(true, "Require semicolon to unconfuse editors")
} 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