Port of D's enforce() to C++ & Exiv2.
More...
#include <string>
#include "error.hpp"
|
template<typename exception_t , typename T > |
void | enforce (bool condition, const T &arg1) |
| Ensure that condition is true, otherwise throw an exception of the type exception_t. More...
|
|
void | enforce (bool condition, Exiv2::ErrorCode err_code) |
| Ensure that condition is true, otherwise throw an Exiv2::Error with the given error_code.
|
|
template<typename T > |
void | enforce (bool condition, Exiv2::ErrorCode err_code, const T &arg1) |
| Ensure that condition is true, otherwise throw an Exiv2::Error with the given error_code & arg1.
|
|
template<typename T , typename U > |
void | enforce (bool condition, Exiv2::ErrorCode err_code, const T &arg1, const U &arg2) |
| Ensure that condition is true, otherwise throw an Exiv2::Error with the given error_code, arg1 & arg2.
|
|
template<typename T , typename U , typename V > |
void | enforce (bool condition, Exiv2::ErrorCode err_code, const T &arg1, const U &arg2, const V &arg3) |
| Ensure that condition is true, otherwise throw an Exiv2::Error with the given error_code, arg1, arg2 & arg3.
|
|
Port of D's enforce() to C++ & Exiv2.
- Author
- Dan Čermák (D4N) dan.cermak@cgc-instruments.com
- Date
- 11-March-18, D4N: created
template<typename exception_t , typename T >
void enforce |
( |
bool |
condition, |
|
|
const T & |
arg1 |
|
) |
| |
|
inline |