azure-core
Namespaces | Macros
azure_assert.hpp File Reference

Provide assert macros to use with pre-conditions. More...

#include "azure/core/platform.hpp"
#include <cstdlib>
#include <string>
#include <cassert>

Go to the source code of this file.

Namespaces

 Azure
 Azure SDK abstractions.
 
 Azure::Core
 Abstractions commonly used by Azure SDK client libraries.
 

Macros

#define AZURE_ASSERT(exp)   assert((exp))
 
#define AZURE_ASSERT_MSG(exp, msg)   assert(((void)msg, (exp)))
 
#define AZURE_ASSERT_FALSE(exp)   AZURE_ASSERT(!(exp))
 
#define AZURE_UNREACHABLE_CODE()   ::Azure::Core::_internal::AzureNoReturnPath("unreachable code!")
 
#define AZURE_NOT_IMPLEMENTED()   ::Azure::Core::_internal::AzureNoReturnPath("not implemented code!")
 

Detailed Description

Attention
These macros are deprecated for public use - they should NOT be used by any callers outside of the SDK.
Remarks
Asserts are turned ON when NDEBUG is NOT defined (for Debug build). For Release build, std::abort() is directly called if the condition is false, without calling assert().