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