Strong typedef: Add edit_base() method to return a base reference
This commit is contained in:
@@ -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;
|
||||||
|
Reference in New Issue
Block a user