Strong typedef: Add edit_base() method to return a base reference

This commit is contained in:
Jonathan G Rennison
2023-12-18 23:10:09 +00:00
parent 8d0506412c
commit 1d23ae5fdd

View File

@@ -306,6 +306,7 @@ namespace StrongType {
/* Only allow conversion to BaseType via method. */ /* Only allow conversion to BaseType via method. */
constexpr TBaseType base() const { return this->value; } 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(). */ /* Only allow TProperties classes access to the internal value. Everyone else needs to call .base(). */
friend struct Compare; friend struct Compare;