Skip to content

Commit

Permalink
add a simple test for the Print struct demonstrating template usage
Browse files Browse the repository at this point in the history
  • Loading branch information
lanl2vz committed Jan 20, 2025
1 parent 8dedf5c commit ebb1508
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
Binary file added test/test
Binary file not shown.
16 changes: 16 additions & 0 deletions test/test.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#include <iostream>
#include <string>

struct Print
{
template <typename T>
Print(T t)
{
std::cout << t << std::endl;
}
};

int main()
{
Print p(10);
}

0 comments on commit ebb1508

Please sign in to comment.