8#ifndef INCLUDED_BSLS_ASSERT
9#define INCLUDED_BSLS_ASSERT
1544#include <bsls_annotation.h>
1553#ifdef BSLS_ASSERT_USE_CONTRACTS
1561#if defined(BSLS_ASSERT_OPT)
1562#error BSLS_ASSERT_OPT is already defined!
1565#if defined(BSLS_ASSERT_OPT_IS_ACTIVE)
1566#error BSLS_ASSERT_OPT_IS_ACTIVE is already defined!
1569#if defined(BSLS_ASSERT_OPT_IS_ASSUMED)
1570#error BSLS_ASSERT_OPT_IS_ASSUMED is already defined!
1573#if defined(BSLS_ASSERT_OPT_IS_REVIEW)
1574#error BSLS_ASSERT_OPT_IS_REVIEW is already defined!
1577#if defined(BSLS_ASSERT_OPT_IS_USED)
1578#error BSLS_ASSERT_OPT_IS_USED is already defined!
1581#if defined(BSLS_ASSERT)
1582#error BSLS_ASSERT is already defined!
1585#if defined(BSLS_ASSERT_IS_ACTIVE)
1586#error BSLS_ASSERT_IS_ACTIVE is already defined!
1589#if defined(BSLS_ASSERT_IS_ASSUMED)
1590#error BSLS_ASSERT_IS_ASSUMED is already defined!
1593#if defined(BSLS_ASSERT_IS_REVIEW)
1594#error BSLS_ASSERT_IS_REVIEW is already defined!
1597#if defined(BSLS_ASSERT_IS_USED)
1598#error BSLS_ASSERT_IS_USED is already defined!
1601#if defined(BSLS_ASSERT_SAFE)
1602#error BSLS_ASSERT_SAFE is already defined!
1605#if defined(BSLS_ASSERT_SAFE_IS_ACTIVE)
1606#error BSLS_ASSERT_SAFE_IS_ACTIVE is already defined!
1609#if defined(BSLS_ASSERT_SAFE_IS_ASSUMED)
1610#error BSLS_ASSERT_SAFE_IS_ASSUMED is already defined!
1613#if defined(BSLS_ASSERT_SAFE_IS_REVIEW)
1614#error BSLS_ASSERT_SAFE_IS_REVIEW is already defined!
1617#if defined(BSLS_ASSERT_SAFE_IS_USED)
1618#error BSLS_ASSERT_SAFE_IS_USED is already defined!
1621#if defined(BSLS_ASSERT_INVOKE)
1622#error BSLS_ASSERT_INVOKE is already defined!
1625#if defined(BSLS_ASSERT_INVOKE_NORETURN)
1626#error BSLS_ASSERT_INVOKE_NORETURN is already defined!
1643#if !(defined(BSLS_ASSERT_LEVEL_ASSERT_SAFE) || \
1644 defined(BSLS_ASSERT_LEVEL_ASSERT) || \
1645 defined(BSLS_ASSERT_LEVEL_ASSERT_OPT) || \
1646 defined(BSLS_ASSERT_LEVEL_NONE) || \
1647 defined(BSLS_ASSERT_LEVEL_ASSUME_OPT) || \
1648 defined(BSLS_ASSERT_LEVEL_ASSUME_ASSERT) || \
1649 defined(BSLS_ASSERT_LEVEL_ASSUME_SAFE))
1650 #define BSLS_ASSERT_NO_ASSERTION_MACROS_DEFINED 1
1652 #define BSLS_ASSERT_NO_ASSERTION_MACROS_DEFINED 0
1655#ifdef BSLS_ASSERT_USE_CONTRACTS
1656#define BSLS_ASSERT_ASSERT_IMP(X,LVL) [[ assert check_never_continue : X ]]
1658#define BSLS_ASSERT_ASSUME_IMP(X,LVL) [[ assert assume : X ]]
1659#define BSLS_ASSERT_ASSUME_ENABLED
1661#ifdef BSLS_ASSERT_VALIDATE_DISABLED_MACROS
1662#define BSLS_ASSERT_DISABLED_IMP(X,LVL) [[ assert ignore : X ]]
1664#define BSLS_ASSERT_DISABLED_IMP(X,LVL)
1668#define BSLS_ASSERT_ASSERT_IMP(X,LVL) do { \
1669 if (BSLS_PERFORMANCEHINT_PREDICT_UNLIKELY(!(X))) { \
1670 BSLS_PERFORMANCEHINT_UNLIKELY_HINT; \
1671 BloombergLP::bsls::AssertViolation violation( \
1673 BSLS_ASSERTIMPUTIL_FILE, \
1674 BSLS_ASSERTIMPUTIL_LINE, \
1676 BloombergLP::bsls::Assert::invokeHandler(violation); \
1680#if defined(BSLS_PLATFORM_CMP_CLANG)
1682#define BSLS_ASSERT_ASSUME_IMP(X,LVL) __builtin_assume((X)?true:false)
1683#define BSLS_ASSERT_ASSUME_ENABLED
1685#elif defined(BSLS_PLATFORM_CMP_GNU)
1697#elif defined (BSLS_PLATFORM_CMP_MSVC)
1698#define BSLS_ASSERT_ASSUME_IMP(X,LVL) __assume((X)?true:false)
1699#define BSLS_ASSERT_ASSUME_ENABLED
1703#if !defined(BSLS_ASSERT_ASSUME_IMP)
1707#define BSLS_ASSERT_ASSUME_IMP(X,LVL) BSLS_ASSERT_DISABLED_IMP(X,LVL)
1710#ifdef BSLS_ASSERT_VALIDATE_DISABLED_MACROS
1711#define BSLS_ASSERT_DISABLED_IMP(X,LVL) (void)sizeof((!(X))?true:false)
1713#define BSLS_ASSERT_DISABLED_IMP(X,LVL)
1724#if defined(BSLS_ASSERT_LEVEL_ASSERT_SAFE) \
1725 || BSLS_ASSERT_NO_ASSERTION_MACROS_DEFINED && ( \
1726 defined(BDE_BUILD_TARGET_SAFE_2) || \
1727 defined(BDE_BUILD_TARGET_SAFE) )
1728 #define BSLS_ASSERT_SAFE_IS_ACTIVE
1729#elif defined(BSLS_REVIEW_SAFE_IS_ACTIVE)
1730 #define BSLS_ASSERT_SAFE_IS_REVIEW
1731#elif defined(BSLS_ASSERT_LEVEL_ASSUME_SAFE) && \
1732 !defined(BSLS_REVIEW_OPT_IS_ACTIVE) && \
1733 !defined(BSLS_REVIEW_IS_ACTIVE) && \
1734 !defined(BSLS_REVIEW_SAFE_IS_ACTIVE)
1735 #define BSLS_ASSERT_SAFE_IS_ASSUMED
1739#if defined(BSLS_ASSERT_SAFE_IS_REVIEW) || \
1740 defined(BSLS_ASSERT_SAFE_IS_ACTIVE) || \
1741 (defined(BSLS_ASSERT_SAFE_IS_ASSUMED) \
1742 && defined(BSLS_ASSERT_ASSUME_ENABLED)) || \
1743 defined(BSLS_ASSERT_VALIDATE_DISABLED_MACROS)
1744 #define BSLS_ASSERT_SAFE_IS_USED
1749#if defined(BSLS_ASSERT_SAFE_IS_ACTIVE)
1750 #define BSLS_ASSERT_SAFE(X) BSLS_ASSERT_ASSERT_IMP( \
1752 BloombergLP::bsls::Assert::k_LEVEL_SAFE)
1753#elif defined(BSLS_ASSERT_SAFE_IS_REVIEW)
1754 #define BSLS_ASSERT_SAFE(X) BSLS_REVIEW_REVIEW_IMP( \
1756 BloombergLP::bsls::Assert::k_LEVEL_SAFE)
1757#elif defined(BSLS_ASSERT_SAFE_IS_ASSUMED)
1758 #define BSLS_ASSERT_SAFE(X) BSLS_ASSERT_ASSUME_IMP( \
1760 BloombergLP::bsls::Assert::k_LEVEL_SAFE)
1762 #define BSLS_ASSERT_SAFE(X) BSLS_ASSERT_DISABLED_IMP( \
1764 BloombergLP::bsls::Assert::k_LEVEL_SAFE)
1775#if defined(BSLS_ASSERT_LEVEL_ASSERT_SAFE) || \
1776 defined(BSLS_ASSERT_LEVEL_ASSERT) \
1777 || BSLS_ASSERT_NO_ASSERTION_MACROS_DEFINED && ( \
1778 defined(BDE_BUILD_TARGET_SAFE_2) || \
1779 defined(BDE_BUILD_TARGET_SAFE) || \
1780 !defined(BDE_BUILD_TARGET_OPT) )
1781 #define BSLS_ASSERT_IS_ACTIVE
1782#elif defined(BSLS_REVIEW_IS_ACTIVE)
1783 #define BSLS_ASSERT_IS_REVIEW
1784#elif (defined(BSLS_ASSERT_LEVEL_ASSUME_SAFE) || \
1785 defined(BSLS_ASSERT_LEVEL_ASSUME_ASSERT)) && \
1786 !defined(BSLS_REVIEW_OPT_IS_ACTIVE) && \
1787 !defined(BSLS_REVIEW_IS_ACTIVE) && \
1788 !defined(BSLS_REVIEW_SAFE_IS_ACTIVE)
1789 #define BSLS_ASSERT_IS_ASSUMED
1793#if defined(BSLS_ASSERT_IS_REVIEW) || \
1794 defined(BSLS_ASSERT_IS_ACTIVE) || \
1795 (defined(BSLS_ASSERT_IS_ASSUMED) \
1796 && defined(BSLS_ASSERT_ASSUME_ENABLED)) || \
1797 defined(BSLS_ASSERT_VALIDATE_DISABLED_MACROS)
1798 #define BSLS_ASSERT_IS_USED
1803#if defined(BSLS_ASSERT_IS_ACTIVE)
1804 #define BSLS_ASSERT(X) BSLS_ASSERT_ASSERT_IMP( \
1806 BloombergLP::bsls::Assert::k_LEVEL_ASSERT)
1807#elif defined(BSLS_ASSERT_IS_REVIEW)
1808 #define BSLS_ASSERT(X) BSLS_REVIEW_REVIEW_IMP( \
1810 BloombergLP::bsls::Assert::k_LEVEL_ASSERT)
1811#elif defined(BSLS_ASSERT_IS_ASSUMED)
1812 #define BSLS_ASSERT(X) BSLS_ASSERT_ASSUME_IMP( \
1814 BloombergLP::bsls::Assert::k_LEVEL_ASSERT)
1816 #define BSLS_ASSERT(X) BSLS_ASSERT_DISABLED_IMP( \
1818 BloombergLP::bsls::Assert::k_LEVEL_ASSERT)
1828#if defined(BSLS_ASSERT_LEVEL_ASSERT_SAFE) || \
1829 defined(BSLS_ASSERT_LEVEL_ASSERT) || \
1830 defined(BSLS_ASSERT_LEVEL_ASSERT_OPT) \
1831 || BSLS_ASSERT_NO_ASSERTION_MACROS_DEFINED
1832 #define BSLS_ASSERT_OPT_IS_ACTIVE
1833#elif defined(BSLS_REVIEW_OPT_IS_ACTIVE)
1834 #define BSLS_ASSERT_OPT_IS_REVIEW
1835#elif (defined(BSLS_ASSERT_LEVEL_ASSUME_SAFE) || \
1836 defined(BSLS_ASSERT_LEVEL_ASSUME_ASSERT) || \
1837 defined(BSLS_ASSERT_LEVEL_ASSUME_OPT)) && \
1838 !defined(BSLS_REVIEW_OPT_IS_ACTIVE) && \
1839 !defined(BSLS_REVIEW_IS_ACTIVE) && \
1840 !defined(BSLS_REVIEW_SAFE_IS_ACTIVE)
1841 #define BSLS_ASSERT_OPT_IS_ASSUMED
1845#if defined(BSLS_ASSERT_OPT_IS_REVIEW) || \
1846 defined(BSLS_ASSERT_OPT_IS_ACTIVE) || \
1847 (defined(BSLS_ASSERT_OPT_IS_ASSUMED) \
1848 && defined(BSLS_ASSERT_ASSUME_ENABLED)) || \
1849 defined(BSLS_ASSERT_VALIDATE_DISABLED_MACROS)
1850 #define BSLS_ASSERT_OPT_IS_USED
1855#if defined(BSLS_ASSERT_OPT_IS_ACTIVE)
1856 #define BSLS_ASSERT_OPT(X) BSLS_ASSERT_ASSERT_IMP( \
1858 BloombergLP::bsls::Assert::k_LEVEL_OPT)
1859#elif defined(BSLS_ASSERT_OPT_IS_REVIEW)
1860 #define BSLS_ASSERT_OPT(X) BSLS_REVIEW_REVIEW_IMP( \
1862 BloombergLP::bsls::Assert::k_LEVEL_OPT)
1863#elif defined(BSLS_ASSERT_OPT_IS_ASSUMED)
1864 #define BSLS_ASSERT_OPT(X) BSLS_ASSERT_ASSUME_IMP( \
1866 BloombergLP::bsls::Assert::k_LEVEL_OPT)
1868 #define BSLS_ASSERT_OPT(X) BSLS_ASSERT_DISABLED_IMP( \
1870 BloombergLP::bsls::Assert::k_LEVEL_OPT)
1878#define BSLS_ASSERT_INVOKE(X) do { \
1879 BloombergLP::bsls::AssertViolation violation( \
1881 BSLS_ASSERTIMPUTIL_FILE, \
1882 BSLS_ASSERTIMPUTIL_LINE, \
1883 BloombergLP::bsls::Assert::k_LEVEL_INVOKE); \
1884 BloombergLP::bsls::Assert::invokeHandler(violation); \
1895#define BSLS_ASSERT_INVOKE_NORETURN(X) do { \
1896 BloombergLP::bsls::AssertViolation violation( \
1898 BSLS_ASSERTIMPUTIL_FILE, \
1899 BSLS_ASSERTIMPUTIL_LINE, \
1900 BloombergLP::bsls::Assert::k_LEVEL_INVOKE); \
1901 BloombergLP::bsls::Assert::invokeHandlerNoReturn(violation); \
1908#ifdef BSLS_ASSERT_ENABLE_NORETURN_FOR_INVOKE_HANDLER
1909#define BSLS_ASSERT_NORETURN_INVOKE_HANDLER BSLS_ANNOTATION_NORETURN
1911#define BSLS_ASSERT_NORETURN_INVOKE_HANDLER
1915#ifndef BSLS_ASSERT_RECURSIVELY_INCLUDED_TESTDRIVER_GUARD
1916#define BSLS_ASSERT_RECURSIVELY_INCLUDED_TESTDRIVER_GUARD
1932 const char *d_comment_p;
1936 const char *d_fileName_p;
1942 const char *d_assertLevel_p;
2017 typedef void (*
Handler)(
const char *,
const char *, int);
2120#ifdef BSLS_ASSERT_USE_CONTRACTS
2121 static void invokeLanguageContractHandler(
2122 const std::contract_violation& violation);
2161 static void failAbort(
const char *comment,
const char *file,
int line);
2170 static void failSleep(
const char *comment,
const char *file,
int line);
2179 static void failThrow(
const char *comment,
const char *file,
int line);
2252#ifndef BDE_OPENSOURCE_PUBLICATION
2264#ifndef BDE_OMIT_INTERNAL_DEPRECATED
2271#define BDE_ASSERT_H(X) BSLS_ASSERT_SAFE(X)
2272#define BSL_ASSERT_H(X) BSLS_ASSERT_SAFE(X)
2280#define BDE_ASSERT_CPP(X) BSLS_ASSERT(X)
2281#define BSL_ASSERT_CPP(X) BSLS_ASSERT(X)
2295#define BSLS_ASSERT_ASSERT(X) BSLS_ASSERT_ASSERT_IMP( \
2297 BloombergLP::bsls::Assert::k_LEVEL_ASSERT)
2324 const char *fileName,
2326 const char *assertLevel)
2327: d_comment_p((comment == 0) ?
"" : comment)
2328, d_fileName_p((fileName == 0) ?
"" : fileName)
2329, d_lineNumber(lineNumber)
2330, d_assertLevel_p((assertLevel == 0) ?
"" : assertLevel)
2338 return d_assertLevel_p;
2350 return d_fileName_p;
2356 return d_lineNumber;
2368#undef BSLS_ASSERT_NORETURN_INVOKE_HANDLER
2369#undef BSLS_ASSERT_NO_ASSERTION_MACROS_DEFINED
2370#undef BSLS_ASSERT_ASSUME_ENABLED
2389#if defined(BSLS_ASSERT_LEVEL_ASSERT_SAFE) && \
2390 defined(BSLS_ASSERT_LEVEL_ASSERT)
2391#error incompatible BSLS_ASSERT levels: \
2392..._LEVEL_ASSERT_SAFE and ..._LEVEL_ASSERT
2395#if defined(BSLS_ASSERT_LEVEL_ASSERT_SAFE) && \
2396 defined(BSLS_ASSERT_LEVEL_ASSERT_OPT)
2397#error incompatible BSLS_ASSERT levels: \
2398..._LEVEL_ASSERT_SAFE and ..._LEVEL_ASSERT_OPT
2401#if defined(BSLS_ASSERT_LEVEL_ASSERT_SAFE) && \
2402 defined(BSLS_ASSERT_LEVEL_NONE)
2403#error incompatible BSLS_ASSERT levels: \
2404..._LEVEL_ASSERT_SAFE and ..._LEVEL_NONE
2407#if defined(BSLS_ASSERT_LEVEL_ASSERT_SAFE) && \
2408 defined(BSLS_ASSERT_LEVEL_ASSUME_OPT)
2409#error incompatible BSLS_ASSERT levels: \
2410..._LEVEL_ASSERT_SAFE and ..._LEVEL_ASSUME_OPT
2413#if defined(BSLS_ASSERT_LEVEL_ASSERT_SAFE) && \
2414 defined(BSLS_ASSERT_LEVEL_ASSUME_ASSERT)
2415#error incompatible BSLS_ASSERT levels: \
2416..._LEVEL_ASSERT_SAFE and ..._LEVEL_ASSUME_ASSERT
2419#if defined(BSLS_ASSERT_LEVEL_ASSERT_SAFE) && \
2420 defined(BSLS_ASSERT_LEVEL_ASSUME_SAFE)
2421#error incompatible BSLS_ASSERT levels: \
2422..._LEVEL_ASSERT_SAFE and ..._LEVEL_ASSUME_SAFE
2425#if defined(BSLS_ASSERT_LEVEL_ASSERT) && \
2426 defined(BSLS_ASSERT_LEVEL_ASSERT_OPT)
2427#error incompatible BSLS_ASSERT levels: \
2428..._LEVEL_ASSERT and ..._LEVEL_ASSERT_OPT
2431#if defined(BSLS_ASSERT_LEVEL_ASSERT) && \
2432 defined(BSLS_ASSERT_LEVEL_NONE)
2433#error incompatible BSLS_ASSERT levels: \
2434..._LEVEL_ASSERT and ..._LEVEL_NONE
2437#if defined(BSLS_ASSERT_LEVEL_ASSERT) && \
2438 defined(BSLS_ASSERT_LEVEL_ASSUME_OPT)
2439#error incompatible BSLS_ASSERT levels: \
2440..._LEVEL_ASSERT and ..._LEVEL_ASSUME_OPT
2443#if defined(BSLS_ASSERT_LEVEL_ASSERT) && \
2444 defined(BSLS_ASSERT_LEVEL_ASSUME_ASSERT)
2445#error incompatible BSLS_ASSERT levels: \
2446..._LEVEL_ASSERT and ..._LEVEL_ASSUME_ASSERT
2449#if defined(BSLS_ASSERT_LEVEL_ASSERT) && \
2450 defined(BSLS_ASSERT_LEVEL_ASSUME_SAFE)
2451#error incompatible BSLS_ASSERT levels: \
2452..._LEVEL_ASSERT and ..._LEVEL_ASSUME_SAFE
2455#if defined(BSLS_ASSERT_LEVEL_ASSERT_OPT) && \
2456 defined(BSLS_ASSERT_LEVEL_NONE)
2457#error incompatible BSLS_ASSERT levels: \
2458..._LEVEL_ASSERT_OPT and ..._LEVEL_NONE
2461#if defined(BSLS_ASSERT_LEVEL_ASSERT_OPT) && \
2462 defined(BSLS_ASSERT_LEVEL_ASSUME_OPT)
2463#error incompatible BSLS_ASSERT levels: \
2464..._LEVEL_ASSERT_OPT and ..._LEVEL_ASSUME_OPT
2467#if defined(BSLS_ASSERT_LEVEL_ASSERT_OPT) && \
2468 defined(BSLS_ASSERT_LEVEL_ASSUME_ASSERT)
2469#error incompatible BSLS_ASSERT levels: \
2470..._LEVEL_ASSERT_OPT and ..._LEVEL_ASSUME_ASSERT
2473#if defined(BSLS_ASSERT_LEVEL_ASSERT_OPT) && \
2474 defined(BSLS_ASSERT_LEVEL_ASSUME_SAFE)
2475#error incompatible BSLS_ASSERT levels: \
2476..._LEVEL_ASSERT_OPT and ..._LEVEL_ASSUME_SAFE
2479#if defined(BSLS_ASSERT_LEVEL_NONE) && \
2480 defined(BSLS_ASSERT_LEVEL_ASSUME_OPT)
2481#error incompatible BSLS_ASSERT levels: \
2482..._LEVEL_NONE and ..._LEVEL_ASSUME_OPT
2485#if defined(BSLS_ASSERT_LEVEL_NONE) && \
2486 defined(BSLS_ASSERT_LEVEL_ASSUME_ASSERT)
2487#error incompatible BSLS_ASSERT levels: \
2488..._LEVEL_NONE and ..._LEVEL_ASSUME_ASSERT
2491#if defined(BSLS_ASSERT_LEVEL_NONE) && \
2492 defined(BSLS_ASSERT_LEVEL_ASSUME_SAFE)
2493#error incompatible BSLS_ASSERT levels: \
2494..._LEVEL_NONE and ..._LEVEL_ASSUME_SAFE
2497#if defined(BSLS_ASSERT_LEVEL_ASSUME_OPT) && \
2498 defined(BSLS_ASSERT_LEVEL_ASSUME_ASSERT)
2499#error incompatible BSLS_ASSERT levels: \
2500..._LEVEL_ASSUME_OPT and ..._LEVEL_ASSUME_ASSERT
2503#if defined(BSLS_ASSERT_LEVEL_ASSUME_OPT) && \
2504 defined(BSLS_ASSERT_LEVEL_ASSUME_SAFE)
2505#error incompatible BSLS_ASSERT levels: \
2506..._LEVEL_ASSUME_OPT and ..._LEVEL_ASSUME_SAFE
2509#if defined(BSLS_ASSERT_LEVEL_ASSUME_ASSERT) && \
2510 defined(BSLS_ASSERT_LEVEL_ASSUME_SAFE)
2511#error incompatible BSLS_ASSERT levels: \
2512..._LEVEL_ASSUME_ASSERT and ..._LEVEL_ASSUME_SAFE
Definition bsls_assert.h:2225
AssertFailureHandlerGuard(Assert::Handler temporary)
AssertFailureHandlerGuard(Assert::ViolationHandler temporary)
~AssertFailureHandlerGuard()
Definition bsls_assert.h:1929
BSLS_KEYWORD_CONSTEXPR AssertViolation(const char *comment, const char *fileName, int lineNumber, const char *assertLevel)
Definition bsls_assert.h:2323
int lineNumber() const
Return the lineNumber attribute of this object.
Definition bsls_assert.h:2354
const char * comment() const
Return the comment attribute of this object.
Definition bsls_assert.h:2342
const char * assertLevel() const
Return the assertLevel attribute of this object.
Definition bsls_assert.h:2336
const char * fileName() const
Return the fileName attribute of this object.
Definition bsls_assert.h:2348
Definition bsls_assert.h:1997
static Assert::ViolationHandler violationHandler()
static BSLS_ANNOTATION_NORETURN void invokeHandlerNoReturn(const AssertViolation &violation)
static BSLS_ANNOTATION_NORETURN void failSleep(const char *comment, const char *file, int line)
static const char k_LEVEL_ASSERT[]
Definition bsls_assert.h:2046
static void setViolationHandler(Assert::ViolationHandler function)
static void lockAssertAdministration()
static const char k_LEVEL_SAFE[]
Definition bsls_assert.h:2044
static Assert::Handler failureHandler()
static BSLS_ASSERT_NORETURN_INVOKE_HANDLER void invokeHandler(const char *text, const char *file, int line)
static BSLS_ANNOTATION_NORETURN void failByThrow(const AssertViolation &violation)
static BSLS_ANNOTATION_NORETURN void failBySleep(const AssertViolation &violation)
static bool abortUponReturningAssertionFailureHandler()
static void setFailureHandler(Assert::Handler function)
static BSLS_ANNOTATION_NORETURN void failAbort(const char *comment, const char *file, int line)
static BSLS_ANNOTATION_NORETURN void failByAbort(const AssertViolation &violation)
static void permitOutOfPolicyReturningFailureHandler()
void(* Handler)(const char *, const char *, int)
Definition bsls_assert.h:2017
static BSLS_ASSERT_NORETURN_INVOKE_HANDLER void invokeHandler(const AssertViolation &violation)
static const char k_LEVEL_INVOKE[]
Definition bsls_assert.h:2047
static const char k_LEVEL_OPT[]
Definition bsls_assert.h:2045
void(* ViolationHandler)(const AssertViolation &)
Definition bsls_assert.h:2008
static const char * k_permitOutOfPolicyReturningAssertionBuildKey
Definition bsls_assert.h:2050
static BSLS_ANNOTATION_NORETURN void failThrow(const char *comment, const char *file, int line)
#define BSLS_ANNOTATION_NORETURN
Definition bsls_annotation.h:383
bsls::Assert bsls_Assert
This alias is defined for backward compatibility.
Definition bsls_assert.h:2302
bsls::AssertFailureHandlerGuard bsls_AssertFailureHandlerGuard
This alias is defined for backward compatibility.
Definition bsls_assert.h:2305
bsls::AssertFailureHandlerGuard bdes_AssertFailureHandlerGuard
This alias is defined for backward compatibility.
Definition bsls_assert.h:2287
#define BSLS_ASSERT_NORETURN_INVOKE_HANDLER
Definition bsls_assert.h:1911
bsls::Assert bdes_Assert
This alias is defined for backward compatibility.
Definition bsls_assert.h:2284
#define BSLS_IDENT(str)
Definition bsls_ident.h:195
#define BSLS_KEYWORD_CONSTEXPR
Definition bsls_keyword.h:588
Definition bdlt_iso8601util.h:691