From 1d23ae5fdd344abddd4ed5971087288435ecfa31 Mon Sep 17 00:00:00 2001 From: Jonathan G Rennison Date: Mon, 18 Dec 2023 23:10:09 +0000 Subject: [PATCH] Strong typedef: Add edit_base() method to return a base reference --- src/core/strong_typedef_type.hpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/core/strong_typedef_type.hpp b/src/core/strong_typedef_type.hpp index c37bac26ef..fb6086f764 100644 --- a/src/core/strong_typedef_type.hpp +++ b/src/core/strong_typedef_type.hpp @@ -306,6 +306,7 @@ namespace StrongType { /* Only allow conversion to BaseType via method. */ constexpr TBaseType base() const { return this->value; } + constexpr TBaseType &edit_base() { return this->value; } /* Only allow TProperties classes access to the internal value. Everyone else needs to call .base(). */ friend struct Compare;