|
| #define | ASE_CPP_STRINGIFY(s) |
| | Convert macro argument into a C const char*.
|
| |
| #define | ASE_CPP_STRINGIFY_(s) |
| |
| #define | ASE_CPP_PASTE2_(a, b) |
| |
| #define | ASE_CPP_PASTE2(a, b) |
| | Paste two macro arguments into one C symbol name.
|
| |
| #define | ASE_ISLIKELY(expr) |
| | Compiler hint to optimize for expr evaluating to true.
|
| |
| #define | ASE_UNLIKELY(expr) |
| | Compiler hint to optimize for expr evaluating to false.
|
| |
| #define | ASE_ABS(a) |
| | Yield the absolute value of a.
|
| |
| #define | ASE_MIN(a, b) |
| | Yield the smaller value of a and b.
|
| |
| #define | ASE_MAX(a, b) |
| | Yield the greater value of a and b.
|
| |
| #define | ASE_CLAMP(v, mi, ma) |
| | Yield v clamped to [ mi .. ma ].
|
| |
| #define | ASE_ARRAY_SIZE(array) |
| | Yield the number of C array elements.
|
| |
| #define | ASE_ALIGN(size, base) |
| | Round up size to multiples of base.
|
| |
| #define | ASE_ALIGNMENT16(pointer) |
| |
| #define | ASE_ALIGNED16(pointer) |
| |
| #define | ASE_COLD |
| |
| #define | ASE_CONSTRUCTOR |
| |
| #define | ASE_DEPRECATED |
| |
| #define | ASE_FORMAT(fx) |
| |
| #define | ASE_HOT |
| |
| #define | ASE_MALLOC |
| |
| #define | ASE_MAY_ALIAS |
| |
| #define | ASE_NOINLINE |
| |
| #define | ASE_NORETURN |
| |
| #define | ASE_NO_INSTRUMENT |
| |
| #define | ASE_PRINTF(fx, ax) |
| |
| #define | ASE_PURE |
| |
| #define | ASE_SCANF(fx, ax) |
| |
| #define | ASE_SENTINEL |
| |
| #define | ASE_UNUSED |
| |
| #define | ASE_USE_RESULT |
| |
| #define | ASE_USED |
| |
| #define | ASE_WEAK |
| |
| #define | ASE_RETURN_UNLESS(cond, ...) |
| | Return silently if cond does not evaluate to true, with return value ...
|
| |
| #define | ASE_ASSERT_RETURN(expr, ...) |
| | Return from the current function if expr evaluates to false and issue an assertion warning.
|
| |
| #define | ASE_ASSERT_RETURN_UNREACHED(...) |
| | Return from the current function and issue an assertion warning.
|
| |
| #define | ASE_ASSERT_UNREACHED(...) |
| | Abort and issue an assertion error.
|
| |
| #define | ASE_ASSERT(expr) |
| | Issue an assertion warning if expr evaluates to false.
|
| |
| #define | ASE_ASSERT_WARN(expr) |
| | Issue an assertion warning if expr evaluates to false.
|
| |
| #define | ASE_ASSERT_PARANOID(expr) |
| | Like ASE_ASSERT_WARN(), enabled if expensive expr are allowed.
|
| |
| #define | ASE_DIE(msg) |
| | Abort the program with an error message.
|
| |
| #define | ASE_PERROR_DIE(msg) |
| | Abort the program with an error message and errno error description.
|
| |
| #define | ASE_CLASS_NON_COPYABLE(ClassName) |
| | Delete copy ctor and assignment operator.
|
| |
| #define | ASE_DEFINE_FLAGS_ARITHMETIC(Enum) |
| |
| #define | ASE_DEFINE_MAKE_SHARED(CLASS) |
| | Define a member function static shared_ptr<CLASS> make_shared(ctorargs...);.
|
| |
|
| const char * | Ase::string_demangle_cxx (const char *mangled_identifier) noexcept |
| | Demangle a std::typeinfo.name() string into a proper C++ type name.
|
| |
| void | Ase::perror_die (const std::string &msg) noexcept __attribute__((__noreturn__)) |
| | Issue a warning about an assertion error.
|
| |
| void | Ase::assertion_failed (const char *msg, const char *file, int line, const char *func) noexcept |
| | Print instructive message, handle "breakpoint", "backtrace" and "fatal-warnings" in $ASE_DEBUG.
|
| |
| void | Ase::assertion_fatal (const char *msg, const char *file, int line, const char *func) noexcept |
| | Print a debug message via assertion_failed() and abort the program.
|
| |
| std::string | Ase::backtrace_command () |
| | Find GDB and construct command line.
|
| |
| constexpr bool | Ase::constexpr_equals (const char *a, const char *b, size_t n) |
| | Test string equality at compile time.
|
| |
| template<class T > |
| void | Ase::call_delete (T *o) |
| | Simple way to create a standalone callback to delete an object of type T.
|
| |
| template<class Target , class Source > |
| std::shared_ptr< typename std::remove_pointer< Target >::type > | Ase::shared_ptr_cast (Source *object) |
| | Shorthand for std::dynamic_pointer_cast<>(shared_from_this()).
|
| |
| template<class Target , class Source > |
| const std::shared_ptr< typename std::remove_pointer< Target >::type > | Ase::shared_ptr_cast (const Source *object) |
| | See shared_ptr_cast(Source*).
|
| |
| template<class Target , class Source > |
| std::shared_ptr< typename std::remove_pointer< Target >::type > | Ase::shared_ptr_cast (std::shared_ptr< Source > &sptr) |
| | See shared_ptr_cast(Source*).
|
| |
| template<class Target , class Source > |
| const std::shared_ptr< typename std::remove_pointer< Target >::type > | Ase::shared_ptr_cast (const std::shared_ptr< Source > &sptr) |
| | See shared_ptr_cast(Source*).
|
| |
| template<class Source > |
| std::shared_ptr< typename std::remove_pointer< Source >::type > | Ase::shared_ptr_from (Source *object) |
| | Use shared_ptr_cast<>() to convert an object pointer into a shared_ptr<>.
|
| |
| template<class C > |
| std::shared_ptr< C > | Ase::weak_ptr_fetch_or_create (std::weak_ptr< C > &wptr, const std::function< std::shared_ptr< C >()> &ctor) |
| | Fetch shared_ptr from wptr and create C with ctor if needed.
|
| |