[Task Scheduler]: Make task traits more robust and simple.
Main issue: TaskTraits constructor is not robust; any signature is part of the overload set, even if it may not compile. Because of that, it may not possible to hold TaskTrait in a tuple (depending on implementation). Fix: Expose a single constructor that checks if all traits are valid, or if an extension can accept all traits. Caveat: An extension has to redefine base TaskTrait::ValidTraits as valid (through inheritance). This CL also simplifies querying traits thanks to C++14 relaxed constant expressions. This reduces compile time complexity of TaskTraits constructor from O(n^3) to O(n^2). Cq-Include-Trybots: luci.chromium.try:ios-simulator-cronet;luci.chromium.try:ios-simulator-full-configs Change-Id: I73f993f6be837f1ac665b4b09c78d9d7272435a8 Reviewed-on: https://chromium-review.googlesource.com/c/1194687Reviewed-by:Eugene But <eugenebut@chromium.org> Reviewed-by:
Alex Moshchuk <alexmos@chromium.org> Reviewed-by:
François Doray <fdoray@chromium.org> Commit-Queue: Etienne Pierre-Doray <etiennep@chromium.org> Cr-Commit-Position: refs/heads/master@{#596341}
Showing
This diff is collapsed.
Please register or sign in to comment