Skip to content

Instantly share code, notes, and snippets.

@o11c
Created November 27, 2013 01:10
Show Gist options
  • Save o11c/7669146 to your computer and use it in GitHub Desktop.
Save o11c/7669146 to your computer and use it in GitHub Desktop.
Compiler fail
#include <memory>
#include <vector>
struct Model
{
virtual ~Model() {}
};
struct PositionedModel : public Model
{
std::unique_ptr<Model> model;
};
void frob();
void frob()
{
std::vector<PositionedModel> models;
PositionedModel mesh;
models.push_back(std::move(mesh));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment