Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

1
  • As a quick comment, emplace_back({42, 42} generally doesn't work because that becomes an initializer-list of two integers, rather than a my_pair struct. I think the emplace_back call might work if you also added an initializer list constructor. Of course, one would think this would work out directly, but you also have to consider the perfect-forwarding semantics of emplace_back: in most cases, unless you explicitly name the type, perfect-forwarding functions like emplace_back will take whatever is given exactly at face value with no extra considerations or conversions.
    – user3010322
    Commented Dec 16, 2013 at 4:14