/* * thing.h * * Thing declaration. */ #ifndef THING_H #define THING_H template T thing(T t); #endif /* * thing.cpp * * Thing definition. */ #include "thing.h" template T thing(T t) { return t; } /* * * main.cpp * */ #include "thing.h" #include int main() { std::cout << thing(0); return 0; }