Lines Matching refs:ErrorOr
19 ErrorOr<int> t1() { return 1; } in t1()
20 ErrorOr<int> t2() { return errc::invalid_argument; } in t2()
22 TEST(ErrorOr, SimpleValue) { in TEST() argument
23 ErrorOr<int> a = t1(); in TEST()
29 ErrorOr<int> b = a; in TEST()
40 ErrorOr<std::unique_ptr<int> > t3() { in t3()
44 TEST(ErrorOr, Types) { in TEST() argument
46 ErrorOr<int&> a(x); in TEST()
57 TEST(ErrorOr, Covariant) { in TEST() argument
58 ErrorOr<B*> b(ErrorOr<D*>(nullptr)); in TEST()
59 b = ErrorOr<D*>(nullptr); in TEST()
61 ErrorOr<std::unique_ptr<B> > b1(ErrorOr<std::unique_ptr<D> >(nullptr)); in TEST()
62 b1 = ErrorOr<std::unique_ptr<D> >(nullptr); in TEST()
64 ErrorOr<std::unique_ptr<int>> b2(ErrorOr<int *>(nullptr)); in TEST()
65 ErrorOr<int *> b3(nullptr); in TEST()
66 ErrorOr<std::unique_ptr<int>> b4(b3); in TEST()
69 TEST(ErrorOr, Comparison) { in TEST() argument
70 ErrorOr<int> x(errc::no_such_file_or_directory); in TEST()
74 TEST(ErrorOr, ImplicitConversion) { in TEST() argument
75 ErrorOr<std::string> x("string literal"); in TEST()
79 TEST(ErrorOr, ImplicitConversionCausesMove) { in TEST() argument
86 ErrorOr<Destination> x = s; in TEST()
90 TEST(ErrorOr, ImplicitConversionNoAmbiguity) { in TEST() argument
96 ErrorOr<CastsToErrorCode> x1(casts_to_error_code); in TEST()
97 ErrorOr<CastsToErrorCode> x2 = casts_to_error_code; in TEST()
98 ErrorOr<CastsToErrorCode> x3 = {casts_to_error_code}; in TEST()
99 ErrorOr<CastsToErrorCode> x4{casts_to_error_code}; in TEST()
100 ErrorOr<CastsToErrorCode> x5(errc::no_such_file_or_directory); in TEST()
101 ErrorOr<CastsToErrorCode> x6 = errc::no_such_file_or_directory; in TEST()
102 ErrorOr<CastsToErrorCode> x7 = {errc::no_such_file_or_directory}; in TEST()
103 ErrorOr<CastsToErrorCode> x8{errc::no_such_file_or_directory}; in TEST()
117 !std::is_convertible<const ErrorOr<int *> &,
118 ErrorOr<std::unique_ptr<int>>>::value,
124 !std::is_convertible<ErrorOr<int *> &&,
125 ErrorOr<std::unique_ptr<int>>>::value,
131 static_assert(!std::is_assignable<ErrorOr<std::unique_ptr<int>>,
132 const ErrorOr<int *> &>::value,
137 static_assert(!std::is_assignable<ErrorOr<std::unique_ptr<int>>,
138 ErrorOr<int *> &&>::value,