From da6b384e3abc6fc75aee0dde1471b558c1e51d02 Mon Sep 17 00:00:00 2001 From: Christian Prochaska Date: Tue, 16 May 2023 11:32:22 +0200 Subject: [PATCH] test-mmio: fix build error with `-std=gnu++20` Fixes #4890 --- repos/base/include/util/register.h | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/repos/base/include/util/register.h b/repos/base/include/util/register.h index 58aebe0fc3..9cac41dc34 100644 --- a/repos/base/include/util/register.h +++ b/repos/base/include/util/register.h @@ -134,15 +134,12 @@ struct Genode::Register template struct Bitfield { - enum { - - /** - * Fetch template parameters - */ - SHIFT = _SHIFT, - WIDTH = _WIDTH, - BITFIELD_WIDTH = WIDTH, - }; + /** + * Fetch template parameters + */ + static constexpr size_t SHIFT = _SHIFT; + static constexpr size_t WIDTH = _WIDTH; + static constexpr size_t BITFIELD_WIDTH = WIDTH; /** * Get an unshifted mask of this field