resolve template specialization with inline keyword

This commit is contained in:
hugogogo
2022-06-18 17:58:14 +02:00
parent 72762a79cb
commit 94745ca8a9
11 changed files with 222 additions and 327 deletions

19
tests/tests_mystruct.cpp Normal file
View File

@@ -0,0 +1,19 @@
#include "tests_mystruct.hpp"
mystruct::mystruct(int data)
{_val = new int[2]; _val[0] = data; _val[1] = data;}
mystruct::~mystruct()
{delete[] _val;}
int * mystruct::get_data() const
{return _val;}
std::ostream & operator<<(std::ostream & o, mystruct const * rhs) {
if (rhs != NULL)
o << (*rhs).get_data()[0] << "," << (*rhs).get_data()[1];
else
o << "NULL";
return (o);
}