Skip to content

Commit

Permalink
[core] Added SRT_STATIC_ASSERT macro
Browse files Browse the repository at this point in the history
  • Loading branch information
maxsharabayko committed Apr 1, 2021
1 parent a499c42 commit 9cbf82e
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion srtcore/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,14 +78,19 @@ modified by
#define NET_ERROR WSAGetLastError()
#endif


#ifdef _DEBUG
#include <assert.h>
#define SRT_ASSERT(cond) assert(cond)
#else
#define SRT_ASSERT(cond)
#endif

#if HAVE_FULL_CXX11
#define SRT_STATIC_ASSERT(cond, msg) static_assert(cond, msg)
#else
#define SRT_STATIC_ASSERT(cond, msg)
#endif

#include <exception>

// Class CUDTException exposed for C++ API.
Expand Down

0 comments on commit 9cbf82e

Please sign in to comment.