mirror of
https://gitlab.com/fbb-git/cppannotations
synced 2024-11-18 10:06:54 +01:00
96e77c0240
git-svn-id: https://cppannotations.svn.sourceforge.net/svnroot/cppannotations/trunk@218 f6dd340e-d3f9-0310-b409-bdd246841980
27 lines
389 B
C++
27 lines
389 B
C++
#include <memory>
|
|
#include <iostream>
|
|
#include <fstream>
|
|
|
|
using namespace std;
|
|
|
|
struct Move
|
|
{
|
|
Move()
|
|
{}
|
|
Move(Move &&rvalue)
|
|
{}
|
|
~Move()
|
|
{}
|
|
};
|
|
|
|
//typedef unique_ptr<int> up;
|
|
int main()
|
|
{
|
|
unique_ptr<ifstream> ip(new ifstream("hi"));
|
|
unique_ptr<ifstream> ip2(move(ip));
|
|
|
|
unique_ptr<Move> ip3(new Move);
|
|
unique_ptr<Move> ip4(move(ip3));
|
|
|
|
return 0;
|
|
}
|