summaryrefslogtreecommitdiff
path: root/src/mbgl/util/assert.hpp
blob: 47fc13f94e0e26e748cdda69bbd01f595c5acc65 (plain)
1
2
3
4
5
6
7
8
9
10
#pragma once

#include <cassert>

// Based on FreeBSD's src/include/assert.h
// Licensed under the original BSD license
#define assert_always(expr)                                                                        \
    ((void)((expr) ? ((void)0) : ((void)fprintf(stderr, "%s:%u: failed assertion `%s'\n",          \
                                                __FILE__, __LINE__, #expr),                        \
                                  abort())))