Lines Matching refs:ErrorOr
18 ErrorOr<int> t1() { return 1; } in t1()
19 ErrorOr<int> t2() { return errc::invalid_argument; } in t2()
21 TEST(ErrorOr, SimpleValue) { in TEST() argument
22 ErrorOr<int> a = t1(); in TEST()
28 ErrorOr<int> b = a; in TEST()
39 ErrorOr<std::unique_ptr<int> > t3() { in t3()
43 TEST(ErrorOr, Types) { in TEST() argument
45 ErrorOr<int&> a(x); in TEST()
56 TEST(ErrorOr, Covariant) { in TEST() argument
57 ErrorOr<B*> b(ErrorOr<D*>(nullptr)); in TEST()
58 b = ErrorOr<D*>(nullptr); in TEST()
60 ErrorOr<std::unique_ptr<B> > b1(ErrorOr<std::unique_ptr<D> >(nullptr)); in TEST()
61 b1 = ErrorOr<std::unique_ptr<D> >(nullptr); in TEST()
63 ErrorOr<std::unique_ptr<int>> b2(ErrorOr<int *>(nullptr)); in TEST()
64 ErrorOr<int *> b3(nullptr); in TEST()
65 ErrorOr<std::unique_ptr<int>> b4(b3); in TEST()
68 TEST(ErrorOr, Comparison) { in TEST() argument
69 ErrorOr<int> x(errc::no_such_file_or_directory); in TEST()
73 TEST(ErrorOr, ImplicitConversion) { in TEST() argument
74 ErrorOr<std::string> x("string literal"); in TEST()
78 TEST(ErrorOr, ImplicitConversionCausesMove) { in TEST() argument
85 ErrorOr<Destination> x = s; in TEST()
89 TEST(ErrorOr, ImplicitConversionNoAmbiguity) { in TEST() argument
95 ErrorOr<CastsToErrorCode> x1(casts_to_error_code); in TEST()
96 ErrorOr<CastsToErrorCode> x2 = casts_to_error_code; in TEST()
97 ErrorOr<CastsToErrorCode> x3 = {casts_to_error_code}; in TEST()
98 ErrorOr<CastsToErrorCode> x4{casts_to_error_code}; in TEST()
99 ErrorOr<CastsToErrorCode> x5(errc::no_such_file_or_directory); in TEST()
100 ErrorOr<CastsToErrorCode> x6 = errc::no_such_file_or_directory; in TEST()
101 ErrorOr<CastsToErrorCode> x7 = {errc::no_such_file_or_directory}; in TEST()
102 ErrorOr<CastsToErrorCode> x8{errc::no_such_file_or_directory}; in TEST()
116 !std::is_convertible<const ErrorOr<int *> &,
117 ErrorOr<std::unique_ptr<int>>>::value,
123 !std::is_convertible<ErrorOr<int *> &&,
124 ErrorOr<std::unique_ptr<int>>>::value,
130 static_assert(!std::is_assignable<ErrorOr<std::unique_ptr<int>>&,
131 const ErrorOr<int *> &>::value,
136 static_assert(!std::is_assignable<ErrorOr<std::unique_ptr<int>>&,
137 ErrorOr<int *> &&>::value,