Init
This commit is contained in:
commit
a4010b5b33
|
@ -0,0 +1 @@
|
|||
*.o
|
|
@ -0,0 +1,6 @@
|
|||
template: template.cpp wtf.o
|
||||
g++ -o template template.cpp wtf.o
|
||||
|
||||
wtf.o: wtf.cpp wtf.hpp
|
||||
g++ -o wtf.o -c wtf.cpp
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
#include <iostream>
|
||||
#include "wtf.hpp"
|
||||
|
||||
|
||||
int main()
|
||||
{
|
||||
int number = 42;
|
||||
|
||||
Wtf<int> wtf(number);
|
||||
|
||||
std::cout << wtf.getTest() << std::endl;
|
||||
|
||||
return 0;
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
#include "wtf.hpp"
|
||||
|
||||
|
||||
template <typename T>
|
||||
Wtf<T>::Wtf(T & test): test(test)
|
||||
{
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
T & Wtf<T>::getTest()
|
||||
{
|
||||
return this->test;
|
||||
}
|
Loading…
Reference in New Issue