numerical-collection-cpp 0.10.0
A collection of algorithms in numerical analysis implemented in C++
|
Definition of NUM_COLLECT_PRECONDITION macro. More...
#include <iterator>
#include <string_view>
#include <utility>
#include <fmt/base.h>
#include <fmt/format.h>
#include "num_collect/base/exception.h"
#include "num_collect/logging/logger.h"
#include "num_collect/logging/logging_macros.h"
#include "num_collect/util/source_info_view.h"
Go to the source code of this file.
Macros | |
#define | NUM_COLLECT_PRECONDITION(CONDITION, ...) |
Check whether a precondition is satisfied and throw an exception if not. | |
Functions | |
template<typename... Args> requires (sizeof...(Args) > 0) | |
void | base::impl::handle_precondition_failure (util::source_info_view source, std::string_view condition, const logging::logger &logger, fmt::format_string< Args... > description_format, Args &&... description_args) |
Handle a failure of a precondition. | |
void | base::impl::handle_precondition_failure (util::source_info_view source, std::string_view condition, const logging::logger &logger, std::string_view description) |
Handle a failure of a precondition. | |
template<typename... Args> requires (sizeof...(Args) > 0) | |
void | base::impl::handle_precondition_failure (util::source_info_view source, std::string_view condition, fmt::format_string< Args... > description_format, Args &&... description_args) |
Handle a failure of a precondition. | |
void | base::impl::handle_precondition_failure (util::source_info_view source, std::string_view condition, std::string_view description) |
Handle a failure of a precondition. | |
Definition of NUM_COLLECT_PRECONDITION macro.
Definition in file precondition.h.
#define NUM_COLLECT_PRECONDITION | ( | CONDITION, | |
... ) |
Check whether a precondition is satisfied and throw an exception if not.
This macro can be usable as one of the following signatures:
NUM_COLLECT_PRECONDITION(CONDITION, LOGGER, DESCRIPTION)
NUM_COLLECT_PRECONDITION(CONDITION, DESCRIPTION)
NUM_COLLECT_PRECONDITION(CONDITION, LOGGER, DESCRIPTION_FORMAT, DESCRIPTION_ARGS...)
NUM_COLLECT_PRECONDITION(CONDITION, DESCRIPTION_FORMAT, DESCRIPTION_ARGS...)
Arguments are as follows:
CONDITION
: Condition.LOGGER
: num_collect::logging::logger object to write the log.DESCRIPTION
: Description of the precondition.DESCRIPTION_FORMAT
: Format string of the description.DESCRIPTION_ARGS...
: Arguments for the format string of the description. Definition at line 137 of file precondition.h.
|
inline |
Handle a failure of a precondition.
Args | Types of arguments of the format string of the description. |
[in] | source | Information of the source code. |
[in] | condition | String expression of the condition. |
[in] | logger | Logger. |
[in] | description_format | Format string of the description. |
[in] | description_args | Arguments for the format string of the description. |
Definition at line 81 of file precondition.h.
|
inline |
Handle a failure of a precondition.
[in] | source | Information of the source code. |
[in] | condition | String expression of the condition. |
[in] | logger | Logger. |
[in] | description | Description of the precondition. |
Definition at line 44 of file precondition.h.
|
inline |
Handle a failure of a precondition.
Args | Types of arguments of the format string of the description. |
[in] | source | Information of the source code. |
[in] | condition | String expression of the condition. |
[in] | description_format | Format string of the description. |
[in] | description_args | Arguments for the format string of the description. |
Definition at line 105 of file precondition.h.
|
inline |
Handle a failure of a precondition.
[in] | source | Information of the source code. |
[in] | condition | String expression of the condition. |
[in] | description | Description of the precondition. |
Definition at line 61 of file precondition.h.