Created on 2008-05-23.00:00:00 last changed 171 months ago
Rationale:
std::pair is a heterogeneous container.
Proposed resolution:
Change the synopsis in [utility] to read:
template <class T1, class T2 = T1> struct pair;
Change [pairs] to read:
namespace std { template <class T1, class T2 = T1> struct pair { typedef T1 first_type; typedef T2 second_type; ...
I have one issue with std::pair. Well, it might just be a very annoying historical accident, but why is there no default template argument for the second template argument? This is so annoying when the type in question is looong and hard to write (type deduction with auto won't help those cases where we use it as a return or argument type).
History | |||
---|---|---|---|
Date | User | Action | Args |
2010-10-21 18:28:33 | admin | set | messages: + msg4016 |
2010-10-21 18:28:33 | admin | set | messages: + msg4015 |
2008-05-23 00:00:00 | admin | create |