Skip to content

Instantly share code, notes, and snippets.

@mikeplavsky
Last active September 14, 2020 14:29
Show Gist options
  • Save mikeplavsky/0245b02bc1f9733be4e3e99ae4b15ab5 to your computer and use it in GitHub Desktop.
Save mikeplavsky/0245b02bc1f9733be4e3e99ae4b15ab5 to your computer and use it in GitHub Desktop.
#include <memory>
#include <iostream>
using namespace std;
int main() {
auto p = make_unique<int[]>(20);
decltype(p) p1;
p[7] = 42;
p1 = p;
cout << p1[7] << endl;
}
@mikeplavsky
Copy link
Author

mikeplavsky commented Aug 30, 2020

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment