Lines Matching refs:expected
263 struct expected {
266 constexpr expected() noexcept(noexcept(T{})) : expected(T{}) {}
268 constexpr expected(const T& value) : data_{value, detail::expected_tag_right{}} {}
269 constexpr expected(T&& value) : data_{std::move(value), detail::expected_tag_right{}} {}
270 constexpr expected(const E& error) : data_{error, detail::expected_tag_error{}} {}
271 constexpr expected(E&& error) : data_{std::move(error), detail::expected_tag_error{}} {}
274 constexpr expected(unexpected<G> const& u) : expected{u.value()} {}
277 constexpr expected(unexpected<G>&& u) : expected{std::move(u.value())} {}
340 static_assert(std::is_trivially_destructible_v<expected<int, /*error*/double> >);
341 static_assert(!std::is_trivially_destructible_v<expected<TestType, /*error*/double> >);
342 static_assert(!std::is_trivially_destructible_v<expected<int, /*error*/TestType> >);
343 static_assert(!std::is_trivially_destructible_v<expected<TestType, /*error*/TestType2> >);
347 static constexpr auto t1 = expected<int, double>{};