8#ifndef INCLUDED_BSLMF_ASSERT
9#define INCLUDED_BSLMF_ASSERT
126#include <bslscm_version.h>
135#ifdef BSLS_COMPILERFEATURES_SUPPORT_STATIC_ASSERT
136#define BSLMF_ASSERT(BSLMF_CONSTANT_EXPRESSION) \
137 static_assert((BSLMF_CONSTANT_EXPRESSION), #BSLMF_CONSTANT_EXPRESSION)
146#define BSLMF_ASSERT_CAT(X, Y) BSLMF_ASSERT_CAT_IMP1(X, Y)
147#define BSLMF_ASSERT_CAT_IMP1(X, Y) BSLMF_ASSERT_CAT_IMP2(X, Y)
148#define BSLMF_ASSERT_CAT_IMP2(X, Y) X##Y
154#if defined(BSLS_PLATFORM_CMP_SUN) && BSLS_PLATFORM_CMP_VERSION < 0x5130
160struct Assert_TrueType {
164struct Assert_FalseType {
168struct Assert_If : Assert_TrueType {
172struct Assert_If<false> : Assert_FalseType {
181template <
bool IS_VALID>
195template <
bool IS_VALID>
207#if defined(BSLS_PLATFORM_CMP_SUN) && BSLS_PLATFORM_CMP_VERSION < 0x5130
217#define BSLMF_ASSERT(expr) \
218 struct BSLMF_ASSERT_CAT(bslmf_Assert_, __LINE__) \
219 : ::BloombergLP::bslmf::Assert_If<!!(int)(expr)> \
221 BSLMF_COMPILE_TIME_ASSERTION_FAILURE * dummy; \
224 enum { BSLMF_ASSERT_CAT(bslmf_Assert_Check_, __LINE__) \
225 = sizeof(BSLMF_ASSERT_CAT(bslmf_Assert_, __LINE__)) } \
229#define BSLMF_ASSERT(expr) \
230BSLA_MAYBE_UNUSED typedef BloombergLP::bslmf::AssertTest< \
231 sizeof(BloombergLP::BSLMF_COMPILE_TIME_ASSERTION_FAILURE<!!(expr)>)> \
232 BSLMF_ASSERT_CAT(bslmf_Assert_, __LINE__)
#define BSLS_IDENT(str)
Definition bsls_ident.h:195
Definition bdlbb_blob.h:576
Definition bslmf_assert.h:182
Definition bslmf_assert.h:196