Skip to content

Instantly share code, notes, and snippets.

Last active April 13, 2020 15:53
What would you like to do?
template <typename T, typename U>
struct pair {
T first;
U second;
int main() {
int x = 10;
int y = 20;
pair<int&, int> p{x, x};
pair<int&, int> p1{y, y};
p1 = p; // ill-formed, with std::pair, well-formed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment