TPIE

v1.1rc1-6-g0c97303
tpie_assert.h File Reference

Defines the tp_assert macro. More...

#include <tpie/config.h>
#include <tpie/portability.h>
#include <iostream>
#include <tpie/tpie_log.h>

Go to the source code of this file.

Namespaces

 tpie
 TPIE's namespace.
 

Macros

#define tp_assert(condition, message)
 

Detailed Description

Defines the tp_assert macro.

Definition in file tpie_assert.h.

Macro Definition Documentation

#define tp_assert (   condition,
  message 
)
Value:
{ \
if (!((condition) && 1)) { \
TP_LOG_FATAL_ID("Assertion failed:"); \
TP_LOG_FATAL_ID(message); \
std::cerr << "Assertion (" #condition ") failed " __FILE__ ":" \
<< __LINE__ << ": " << message << "\n"; \
std::terminate(); \
assert(condition); \
} \
}
Parameters
conditionThe condition to assert
messageMessage describing the erroneous condition

Definition at line 47 of file tpie_assert.h.

Referenced by tpie::merge_sorter< T, UseProgress, pred_t >::begin(), tpie::merge_sorter< T, UseProgress, pred_t >::calc(), tpie::merge_sorter< T, UseProgress, pred_t >::can_pull(), tpie::merge_sorter< T, UseProgress, pred_t >::end(), tpie::internal_queue< memory_size_type >::front(), tpie::ami::main_mem_merge(), tpie::ami::stack< T >::main_memory_usage(), tpie::ami::partition_and_merge(), tpie::merge_sorter< T, UseProgress, pred_t >::pull(), tpie::merge_sorter< T, UseProgress, pred_t >::push(), tpie::merge_sorter< T, UseProgress, pred_t >::set_parameters(), tpie::ami::single_merge(), and tpie::ami::Internal_Sorter_Obj< T, Compare >::sort().