Sha256: 7bc6cf1c3a818b76ddb483274f93875c2b7d7102f5fa8600fd796d58dae33914
Contents?: true
Size: 556 Bytes
Versions: 17
Compression:
Stored size: 556 Bytes
Contents
#ifndef _IV_FUNCTOR_H_ #define _IV_FUNCTOR_H_ #include <functional> namespace iv { namespace core { template<typename T> struct Deleter : public std::unary_function<T, void> { void operator()(T* p) const { delete p; } }; template<typename T> struct Deleter<T[]> : public std::unary_function<T[], void> { void operator()(T* p) const { delete [] p; } }; template<typename T> struct Destructor : public std::unary_function<T, void> { void operator()(T* p) const { p->~T(); } }; } } // namespace iv::core #endif // _IV_FUNCTOR_H_
Version data entries
17 entries across 17 versions & 1 rubygems