Added operator-> to optional type.

This commit is contained in:
2023-11-16 00:34:03 +01:00
parent 121e8a84f5
commit ef6830e01c

View File

@@ -142,6 +142,10 @@ public:
constexpr std::remove_reference_t<TValue>& operator*() noexcept { return get(); } constexpr std::remove_reference_t<TValue>& operator*() noexcept { return get(); }
[[nodiscard]] [[nodiscard]]
constexpr const std::remove_reference_t<TValue>& operator*() const noexcept { return get(); } constexpr const std::remove_reference_t<TValue>& operator*() const noexcept { return get(); }
[[nodiscard]]
constexpr std::remove_reference_t<TValue>* operator->() noexcept { return &get(); }
[[nodiscard]]
constexpr const std::remove_reference_t<TValue>* operator->() const noexcept { return &get(); }
public: public:
template<typename... Types> template<typename... Types>
void emplace(Types&&... params) noexcept; void emplace(Types&&... params) noexcept;