irods  4.2.8
About: iRODS (the integrated Rule Oriented Data System) is a distributed data-management system for creating data grids, digital libraries, persistent archives, and real-time data systems.
  Fossies Dox: irods-4.2.8.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

irods_at_scope_exit.hpp
Go to the documentation of this file.
1 #ifndef IRODS_AT_SCOPE_EXIT_HPP
2 #define IRODS_AT_SCOPE_EXIT_HPP
3 
4 #include <utility>
5 
6 namespace irods
7 {
8  template <typename Function>
10  {
11  public:
12  explicit at_scope_exit(Function&& _func)
13  : func_{std::forward<Function>(_func)}
14  {
15  }
16 
17  // Disables copy/move semantics.
18  at_scope_exit(const at_scope_exit&) = delete;
20 
22  {
23  func_();
24  }
25 
26  private:
27  Function func_;
28  };
29 } // namespace irods
30 
31 #endif // IRODS_AT_SCOPE_EXIT_HPP
irods::at_scope_exit
Definition: irods_at_scope_exit.hpp:10
irods::at_scope_exit::operator=
at_scope_exit & operator=(const at_scope_exit &)=delete
irods::at_scope_exit::func_
Function func_
Definition: irods_at_scope_exit.hpp:27
irods::at_scope_exit::~at_scope_exit
~at_scope_exit()
Definition: irods_at_scope_exit.hpp:21
irods
Definition: apiHandler.hpp:35
irods::at_scope_exit::at_scope_exit
at_scope_exit(Function &&_func)
Definition: irods_at_scope_exit.hpp:12
irods::at_scope_exit::at_scope_exit
at_scope_exit(const at_scope_exit &)=delete