Changes in uspace/lib/cpp/include/cassert [bc56f30:7bbf91e] in mainline
- File:
-
- 1 edited
-
uspace/lib/cpp/include/cassert (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/cpp/include/cassert
rbc56f30 r7bbf91e 1 1 /* 2 * Copyright (c) 201 9Jaroslav Jindrak2 * Copyright (c) 2018 Jaroslav Jindrak 3 3 * All rights reserved. 4 4 * … … 30 30 #define LIBCPP_CASSERT 31 31 32 #include < assert.h>32 #include <__bits/common.hpp> 33 33 34 #define __unimplemented() assert(!"Not implemented!") 34 namespace std::hel 35 { 36 extern "C" { 37 #include <assert.h> 38 } 39 } 40 41 namespace std 42 { 43 // Note: The only thing imported is assert 44 // and that is a macro. 45 } 46 47 /** 48 * We need to fix the assert macro because it uses 49 * a non-standard function that we have in the 50 * std::hel namespace. 51 */ 52 #undef assert 53 #define assert(expr) \ 54 do { \ 55 if (!(expr)) \ 56 std::hel::assert_abort(#expr, __FILE__, __LINE__); \ 57 } while (0) 35 58 36 59 #endif
Note:
See TracChangeset
for help on using the changeset viewer.
