| 824 | } |
| 825 | |
| 826 | constexpr decltype(auto) mutableValue() |
| 827 | { |
| 828 | return std::visit( |
| 829 | overload([](Type &v) -> Type & { return v; }, |
| 830 | [](Type const *) -> Type & { |
| 831 | throw std::logic_error( |
| 832 | "Cannot get mutableValue for pointer type!"); |
| 833 | }, |
| 834 | [](std::monostate &) -> Type & { |
| 835 | throw std::logic_error("Invalid state!"); |
| 836 | }), |
| 837 | mVariant); |
| 838 | } |
| 839 | constexpr void reset(int32_t depth) |
| 840 | { |
| 841 | if (mDepth - depth >= 0) |