catch_errno_guard.h 502 B

12345678910111213141516171819202122
  1. /*
  2. * Created by Martin on 06/03/2017.
  3. *
  4. * Distributed under the Boost Software License, Version 1.0. (See accompanying
  5. * file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  6. */
  7. #ifndef TWOBLUECUBES_CATCH_ERRNO_GUARD_H_INCLUDED
  8. #define TWOBLUECUBES_CATCH_ERRNO_GUARD_H_INCLUDED
  9. namespace Catch {
  10. class ErrnoGuard {
  11. public:
  12. ErrnoGuard();
  13. ~ErrnoGuard();
  14. private:
  15. int m_oldErrno;
  16. };
  17. }
  18. #endif // TWOBLUECUBES_CATCH_ERRNO_GUARD_H_INCLUDED