Open geiseri opened 2 years ago
hi, currently the resolved type of all() is vector<any>, which is not converted to vector<T> automatically.
Yeah, I was wondering how hard that behavior would be to change. I'm not a huge fan of type-erasure, but for 99% of the stuff it doesn't matter, and it does make things a bit easier. It was just this one that throwing the bad cast was unexpected.
Greetings, I have the following code:
This compiles but bails with a bad any_cast execption. The following though works:
I am wondering if you can use the container
std::vector<T>::value_type
for the cast from the promise into the function. I am not sure if this would break other stuff though since it would need to happen after resolution. This would also break instances where you have multiple types returned by the promises. Thoughts?