Changeset 7dcce0a in mainline for uspace/lib/cpp/include/cassert
- Timestamp:
- 2019-01-16T18:07:45Z (6 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 4248ce5
- Parents:
- cf9e949
- git-author:
- Jaroslav Jindrak <dzejrou@…> (2019-01-12 15:09:49)
- git-committer:
- jxsvoboda <5887334+jxsvoboda@…> (2019-01-16 18:07:45)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/cpp/include/cassert
rcf9e949 r7dcce0a 1 1 /* 2 * Copyright (c) 201 8Jaroslav Jindrak2 * Copyright (c) 2019 Jaroslav Jindrak 3 3 * All rights reserved. 4 4 * … … 31 31 32 32 33 namespace std::hel 34 { 35 extern "C" { 36 #include <assert.h> 37 } 33 extern "C" { 34 #include <assert.h> 38 35 } 39 36 40 namespace std 41 { 42 // Note: The only thing imported is assert 43 // and that is a macro. 44 } 37 // TODO: For some reason, this function isn't visible (maybe the 38 // noreturn attribute?), adding a redeclaration here for the 39 // time being. 45 40 46 /** 47 * We need to fix the assert macro because it uses 48 * a non-standard function that we have in the 49 * std::hel namespace. 50 */ 51 #undef assert 52 #define assert(expr) \ 53 do { \ 54 if (!(expr)) \ 55 std::hel::assert_abort(#expr, __FILE__, __LINE__); \ 56 } while (0) 41 extern void __helenos_assert_abort(const char *, const char *, unsigned int); 42 43 #define __unimplemented() assert(!"Not implemented!") 57 44 58 45 #endif
Note:
See TracChangeset
for help on using the changeset viewer.