Why is implicit conversion from <int64_t, int64_t> pair to <int, int> pair allowed?
I noticed some cases where std :: pair would be implicitly converted to std :: pair of a different type without warning, but I can't figure out why. I've looked at the constructors for std :: pair and can't figure it out. Can anyone explain this to me?
Example:
std::pair<int,int> a = std::pair<int64_t, int64_t>(1,2);
Doesn't give any warnings with clang -Wall -Weverything.
+3
source to share