-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy pathmain.cpp
57 lines (46 loc) · 805 Bytes
/
main.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
//
// Created by Alone on 2022-8-8.
//
#include<iostream>
#include <fstream>
#include<string>
#include"Parser.h"
#include <Timer.hpp>
using namespace std;
class test_move
{
public:
};
class test
{
public:
private:
test_move m_data;
};
void test_xml_parser()
{
ifstream ifs("../../test_source/test.xml");
if (!ifs)
{
std::cerr << "ifs read error";
exit(1);
}
string text((istreambuf_iterator<char>(ifs)), istreambuf_iterator<char>());
xml::Element element;
{
Timer t;
element = std::move(xml::Parser::FromString(text));
}
ofstream ofs("../../test_source/test_out.xml");
ofs << element.to_string();
}
void test_move_construct()
{
test t{};
test tt(t);
test_move q;
}
int main()
{
test_move_construct();
}