summaryrefslogtreecommitdiff
path: root/include/nsutils/assert.h
blob: 7f59f2f676acd5426ed6ad2fc5ffb085039fea5d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
/*
 * This file is part of LibNSUtils.
 * Licensed under the MIT License,
 *                http://www.opensource.org/licenses/mit-license.php
 * Copyright 2022 Michael Drake <tlsa@netsurf-browser.org>
 */

/**
 * \file
 * Static assertion macro.
 */

#ifndef NSUTILS_ASSERT_H__
#define NSUTILS_ASSERT_H__

/** Compile time assertion macro. */
#define ns_static_assert(e) \
{ \
	enum { \
		ns_static_assert_check = 1 / (!!(e)) \
	}; \
}

#endif