Skip to content

Instantly share code, notes, and snippets.

@narodnik
Created February 3, 2020 11:52
Show Gist options
  • Save narodnik/c5dbc8a7b5c144253254bdb096f7ebd7 to your computer and use it in GitHub Desktop.
Save narodnik/c5dbc8a7b5c144253254bdb096f7ebd7 to your computer and use it in GitHub Desktop.
#include <iostream>
#include <memory>
#include <typeinfo>
#include <vector>
using int_vector = std::vector<int>;
using int_vector_ptr = std::shared_ptr<int_vector>;
void foo(int_vector_ptr v)
{
}
int main()
{
auto v = std::make_shared<int_vector>;
foo(v);
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment