Skip to content

Instantly share code, notes, and snippets.

@loliGothicK
Created May 21, 2018 18:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save loliGothicK/0da7c78e2c3603f77343ec5a08ed0720 to your computer and use it in GitHub Desktop.
Save loliGothicK/0da7c78e2c3603f77343ec5a08ed0720 to your computer and use it in GitHub Desktop.
#include <memory>
int main() {
// bounded array
std::shared_ptr<int[5]> ptr1 { new int[5]{} };
// un-bounded array
std::shared_ptr<int[]> ptr2 { new int[5]{} };
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment