From: Daniel Arndt Date: Mon, 30 Nov 2020 14:24:39 +0000 (-0500) Subject: Fix MGLevelObject variadic template constructor with default arguments X-Git-Tag: v9.3.0-rc1~834^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=23bb906319af2f302482053e1e5ab4057ee7a612;p=dealii.git Fix MGLevelObject variadic template constructor with default arguments --- diff --git a/include/deal.II/base/mg_level_object.h b/include/deal.II/base/mg_level_object.h index 2b57ea888a..f8788fe120 100644 --- a/include/deal.II/base/mg_level_object.h +++ b/include/deal.II/base/mg_level_object.h @@ -71,10 +71,17 @@ public: * @pre minlevel <= maxlevel */ template - MGLevelObject(const unsigned int minlevel = 0, - const unsigned int maxlevel = 0, + MGLevelObject(const unsigned int minlevel, + const unsigned int maxlevel, Args &&... args); + /** + * Constructor. Same as above but without arguments to be forwarded to the + * constructor of the underlying object. + */ + MGLevelObject(const unsigned int minlevel = 0, + const unsigned int maxlevel = 0); + /** * Access object on level @p level. */ @@ -186,6 +193,15 @@ MGLevelObject::MGLevelObject(const unsigned int min, } +template +MGLevelObject::MGLevelObject(const unsigned int min, + const unsigned int max) + : minlevel(0) +{ + resize(min, max); +} + + template Object &MGLevelObject::operator[](const unsigned int i) {