//: C05:OurMin2.h // Declares min as an exported template // (Only works with EDG-based compilers) #ifndef OURMIN2_H #define OURMIN2_H export template<typename T> const T& min(const T&, const T&); #endif // OURMIN2_H ///:~
Listado 6.60. C05/OurMin2.h
// C05:OurMin2.cpp // The definition of the exported min template // (Only works with EDG-based compilers) #include "OurMin2.h" export template<typename T> const T& min(const T& a, const T& b) { return (a < b) ? a : b; } ///:~
Listado 6.61. C05/OurMin2.cpp