Changeset d5a89a3 in mainline for uspace/lib/cpp/include/cassert
- Timestamp:
- 2019-02-11T22:31:04Z (6 years ago)
- Children:
- aaf9789c
- Parents:
- e3272101 (diff), 4805495 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/cpp/include/cassert
re3272101 rd5a89a3 1 1 /* 2 * Copyright (c) 201 8Jaroslav Jindrak2 * Copyright (c) 2019 Jaroslav Jindrak 3 3 * All rights reserved. 4 4 * … … 30 30 #define LIBCPP_CASSERT 31 31 32 #include <__bits/common.hpp>33 32 34 namespace std::hel 35 { 36 extern "C" { 37 #include <assert.h> 38 } 33 extern "C" { 34 #include <assert.h> 39 35 } 40 36 41 namespace std 42 { 43 // Note: The only thing imported is assert 44 // and that is a macro. 45 } 37 // TODO: For some reason, this function isn't visible (maybe the 38 // noreturn attribute?), adding a redeclaration here for the 39 // time being. 46 40 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) 41 extern void __helenos_assert_abort(const char *, const char *, unsigned int); 42 43 #define __unimplemented() assert(!"Not implemented!") 58 44 59 45 #endif
Note:
See TracChangeset
for help on using the changeset viewer.