Skip to content

Instantly share code, notes, and snippets.

@tanakh
Created August 26, 2011 04:49
Show Gist options
  • Save tanakh/1172720 to your computer and use it in GitHub Desktop.
Save tanakh/1172720 to your computer and use it in GitHub Desktop.
#include <vector>
using namespace std;
struct a{
a(int &r): r(r) {}
a(a &&rr): r(rr.r) {}
int &r;
};
int main()
{
vector<a> v;
int x;
v.emplace_back(x);
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment