Created
July 13, 2015 21:28
-
-
Save MrSapps/b6712a7a8d3150804759 to your computer and use it in GitHub Desktop.
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> | |
class fool | |
{ | |
public: | |
fool(std::unique_ptr<char[]>&& ptr) | |
: mPtr(std::move(ptr)) | |
{ | |
} | |
std::unique_ptr<char[]> mPtr; | |
}; | |
int main(int, char**) | |
{ | |
std::unique_ptr<char[]> ptr(new char[128]); | |
fool foo(std::move(ptr)); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment