-
Type: Improvement
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: Internal Code
-
None
-
Fully Compatible
-
Service Arch 2020-03-23, Service Arch 2020-04-06, Service arch 2020-05-04, Service arch 2020-05-18
-
0
Our future's code makes use of a std::is_copy_constructible_v call inside fillChildren to avoid attempting to instantiate implementations for move only T's. There are also a few other static_asserts that check the same parameter.
The problem is that for every T, std::is_copy_constructible_v<std::vector<T>> == true, because std::vector is a crappy old type and always has a copy constructor (it just can't be instantiated for move only types). This causes our static_asserts to be worthless, and for Future<vector<MoveOnly>> to be uninstantiatable.
We should add some kind of util::is_actually_copy_constructible_v that has a special case for vector, and for anything else we end up finding, and use that instead. If we don't do that, the workaround is to wrap your vector's in types that you explicitly make move only, which isn't the best ergonomics