From c7365d80063dc7270ea5685ae65094a5af62acaf Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Thu, 11 Jun 2015 17:31:30 +0300 Subject: add utils/cxx --- utils/common.hpp | 38 -------------------------------------- 1 file changed, 38 deletions(-) delete mode 100644 utils/common.hpp (limited to 'utils/common.hpp') diff --git a/utils/common.hpp b/utils/common.hpp deleted file mode 100644 index af61a32..0000000 --- a/utils/common.hpp +++ /dev/null @@ -1,38 +0,0 @@ -/** - * \file - * \author Egor Tensin - * \date 2015 - * \copyright This file is licensed under the terms of the MIT License. - * See LICENSE.txt for details. - */ - -#pragma once - -#include - -#include - -namespace aesni -{ - class ErrorDetailsThrowsInDestructor - { - public: - ErrorDetailsThrowsInDestructor() - { - aesni_make_error_success(get()); - } - - ~ErrorDetailsThrowsInDestructor() - { - if (m_impl.ec != AESNI_ERROR_SUCCESS) - throw std::runtime_error(aesni_strerror(m_impl.ec)); - } - - AesNI_ErrorDetails* get() { return &m_impl; } - - operator AesNI_ErrorDetails*() { return get(); } - - private: - AesNI_ErrorDetails m_impl; - }; -} -- cgit v1.2.3