Commit c022ead
committed
FTL: Provide definition of BaseFuture where third template parameter is ftl::Future
Bug: 405867217
After llvm/llvm-project#100692, clang is
stricter about template deductions. This causes the following error in
future_test.cpp:
...s/native/include/ftl/future.h:34:29: error: implicit instantiation of
undefined template
'android::ftl::details::BaseFuture<android::ftl::Future<int,
android::ftl::Future>, int, android::ftl::Future>'
34 | class Future final : public details::BaseFuture<Future<T, FutureImpl>, T, FutureImpl> {
| ^
frameworks/native/libs/ftl/future_test.cpp:47:31: note: in
instantiation of template class 'android::ftl::Future<int,
android::ftl::Future>' requested here
47 | ftl::Future<char> chain = ftl::Future(std::move(future))
| ^
frameworks/native/include/ftl/details/future.h:52:7: note: template is declared here
52 | class BaseFuture;
| ^
This is because ftl/details/future.h only provides
an instantiation where the third template parameter is either a
std::future or a std::shared_future. This change extends the
instantiation to support any FutureImpl.
Test: Build future_test.cpp with new clang and old clang, in addition to
presubmit.
Flag: EXEMPT fix error during compiler update
Change-Id: I1795f1f1237f5209fd8138a20c4de2a921c7395b1 parent a83d862 commit c022ead
1 file changed
+5
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
| 51 | + | |
| 52 | + | |
57 | 53 | | |
58 | 54 | | |
59 | 55 | | |
60 | 56 | | |
61 | 57 | | |
62 | 58 | | |
63 | 59 | | |
64 | | - | |
| 60 | + | |
65 | 61 | | |
66 | 62 | | |
67 | 63 | | |
| |||
70 | 66 | | |
71 | 67 | | |
72 | 68 | | |
73 | | - | |
| 69 | + | |
74 | 70 | | |
75 | 71 | | |
76 | 72 | | |
| |||
79 | 75 | | |
80 | 76 | | |
81 | 77 | | |
82 | | - | |
| 78 | + | |
83 | 79 | | |
84 | 80 | | |
85 | 81 | | |
| |||
0 commit comments