/* * ZeroInstance.hpp * * Created on: Aug 10, 2012 * Author: heber */ #ifndef ZEROINSTANCE_HPP_ #define ZEROINSTANCE_HPP_ // include config.h #ifdef HAVE_CONFIG_H #include #endif /** This functions returns an instance equal to zero. * * @return instance initialized to zero */ template T ZeroInstance() { return NULL; } template<> inline double ZeroInstance() { return 0.; } template<> inline int ZeroInstance() { return 0; } template<> inline size_t ZeroInstance() { return (size_t)0; } #endif /* ZEROINSTANCE_HPP_ */