We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f8c81f6 commit 5d0b8b3Copy full SHA for 5d0b8b3
ITEM26.md
@@ -16,7 +16,7 @@ auto&& babo;
16
2. 템플릿과 템플릿이 아닌 함수들이 똑같은 타입을 가지면 템플릿이 아닌 함수를 우선한다.
17
18
### Perfect Forwarding
19
-내가 받은
+내가 받은 대로 돌려주는 것. [참조](http://blog.naver.com/losemarins/221011603702)
20
21
### Example1
22
```c++
@@ -38,3 +38,17 @@ hello((short) 20); // Fucking
38
```
39
40
### Example2
41
+```c++
42
+class Person {
43
+ public:
44
+ template<typename T>
45
+ explicit Person(T&& n) : name(std::forward<T>(n)) {}
46
+ explicit Person(int idx);
47
+
48
+ Person(const Person& rhs); // defined by compiler
49
+ Person(Person&& rhs); // defined by compiler
50
+};
51
52
+Person p("Nancy");
53
+auto cloneOfP(p); // Fucking
54
+```
0 commit comments