| 1131 | } |
| 1132 | |
| 1133 | constexpr decltype(auto) mutableValue() |
| 1134 | { |
| 1135 | return std::visit( |
| 1136 | overload([](Type &v) -> Type & { return v; }, |
| 1137 | [](Type const *) -> Type & { |
| 1138 | throw std::logic_error( |
| 1139 | "Cannot get mutableValue for pointer type!"); |
| 1140 | }, |
| 1141 | [](std::monostate &) -> Type & { |
| 1142 | throw std::logic_error("Invalid state!"); |
| 1143 | }), |
| 1144 | mVariant); |
| 1145 | } |
| 1146 | constexpr void reset(int32_t depth) |
| 1147 | { |
| 1148 | if (mDepth - depth >= 0) |