tfel
Loading...
Searching...
No Matches
Raise.hxx File Reference

declaration of the raise function. More...

#include <utility>
#include <stdexcept>
#include "TFEL/Config/TFELConfig.hxx"
#include "TFEL/Raise.ixx"

Namespaces

namespace  tfel
 the namespace tfel encloses all the TFEL project. This namespace is empty.

Functions

template<typename Exception = std::runtime_error>
TFEL_VISIBILITY_LOCAL TFEL_INLINE void tfel::raise ()
 a small wrapper used to build the exception outside the throw statement. As most exception's classes constructors may throw, this avoids undefined behaviour as reported by the cert-err60-cpp warning of clang-tidy (thrown exception type is not nothrow copy constructible).
template<typename Exception = std::runtime_error, typename... Args>
TFEL_VISIBILITY_LOCAL TFEL_INLINE void tfel::raise (Args &&...)
 a small wrapper used to build the exception outside the throw statement. As most exception's classes constructors may throw, this avoids undefined behaviour as reported by the cert-err60-cpp warning of clang-tidy (thrown exception type is not nothrow copy constructible).
template<typename Exception = std::runtime_error>
TFEL_VISIBILITY_LOCAL TFEL_INLINE void tfel::raise_if (const bool)
 raise an exception if the first argument is true.
template<typename Exception = std::runtime_error, typename... Args>
TFEL_VISIBILITY_LOCAL TFEL_INLINE void tfel::raise_if (const bool, Args &&...)
 raise an exception if the first argument is true.

Detailed Description

declaration of the raise function.

Author
Thomas Helfer
Date
19/09/2017