1 // Copyright 2005 Ben Hutchings <ben@decadentplace.org.uk>.
2 // See the file "COPYING" for licence details.
4 #ifndef INC_AUTO_FD_HPP
5 #define INC_AUTO_FD_HPP
7 #include "auto_handle.hpp"
15 void operator()(int fd) const
19 int result = close(fd);
24 struct auto_fd_factory
26 int operator()() const { return -1; }
28 typedef auto_handle<int, auto_fd_closer, auto_fd_factory> auto_fd;
30 #endif // !INC_AUTO_FD_HPP