18#include <QtCore/private/qglobal_p.h>
32template <
typename Value,
typename Error = QString>
38 if constexpr (std::is_pointer_v<Value>) {
47 if constexpr (std::is_pointer_v<Value>) {
51 m_value = std::move(
v);
60 template <
class... Args>
63 static_assert(std::is_constructible_v<
Error, Args &&...>,
64 "Invalid arguments for creating an error type");
67 constexpr explicit operator bool() const noexcept {
return m_value.has_value(); }
75 constexpr const Value &
value()
const
82 constexpr const Value *
operator->() const noexcept {
return std::addressof(
value()); }
90 std::optional<Value> m_value;
QMaybe(QUnexpect, Args &&...args)
constexpr Value * operator->() noexcept
constexpr Value & value()
QMaybe & operator=(const QMaybe &other)=default
constexpr const Error & error() const
QMaybe(const QMaybe &other)=default
constexpr Value & operator*() &noexcept
constexpr const Value & value() const
QMaybe(const Error &error)
constexpr const Value * operator->() const noexcept
constexpr const Value & operator*() const &noexcept
Combined button and popup list for selecting options.
static constexpr QUnexpect unexpect
GLsizei const GLfloat * v
[13]