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

Version Path
iv-phonic-0.1.8 ext/include/iv/functor.h
iv-phonic-0.1.7 ext/include/iv/functor.h
iv-phonic-0.1.6 ext/include/iv/functor.h
iv-phonic-0.1.5 ext/include/iv/functor.h
iv-phonic-0.1.4 ext/include/iv/functor.h
iv-phonic-0.1.3 ext/include/iv/functor.h
iv-phonic-0.1.2 ext/include/iv/functor.h
iv-phonic-0.1.1 ext/include/iv/functor.h
iv-phonic-0.1.0 ext/include/iv/functor.h
iv-phonic-0.0.9 ext/include/iv/functor.h
iv-phonic-0.0.8 ext/include/iv/functor.h
iv-phonic-0.0.7 ext/include/iv/functor.h
iv-phonic-0.0.6 ext/include/iv/functor.h
iv-phonic-0.0.5 ext/include/iv/functor.h
iv-phonic-0.0.3 ext/include/iv/functor.h
iv-phonic-0.0.2 ext/include/iv/functor.h
iv-phonic-0.0.1 ext/include/iv/functor.h