Created
November 27, 2013 01:10
-
-
Save o11c/7669146 to your computer and use it in GitHub Desktop.
Compiler fail
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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