Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
Actor Framework
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
cpp-libs
Actor Framework
Commits
b6662deb
Commit
b6662deb
authored
Dec 08, 2016
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Avoid ambiguities in CAF_ASSERT
parent
57257de9
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
libcaf_core/caf/config.hpp
libcaf_core/caf/config.hpp
+4
-4
No files found.
libcaf_core/caf/config.hpp
View file @
b6662deb
...
@@ -191,7 +191,7 @@
...
@@ -191,7 +191,7 @@
# define CAF_ASSERT(stmt) \
# define CAF_ASSERT(stmt) \
if (static_cast<bool>(stmt) == false) { \
if (static_cast<bool>(stmt) == false) { \
printf("%s:%u: requirement failed '%s'\n", __FILE__, __LINE__, #stmt); \
printf("%s:%u: requirement failed '%s'\n", __FILE__, __LINE__, #stmt); \
abort();
\
::abort();
\
} static_cast<void>(0)
} static_cast<void>(0)
#else // defined(CAF_LINUX) || defined(CAF_MACOS)
#else // defined(CAF_LINUX) || defined(CAF_MACOS)
# include <execinfo.h>
# include <execinfo.h>
...
@@ -201,18 +201,18 @@
...
@@ -201,18 +201,18 @@
void* array[20]; \
void* array[20]; \
auto caf_bt_size = ::backtrace(array, 20); \
auto caf_bt_size = ::backtrace(array, 20); \
::backtrace_symbols_fd(array, caf_bt_size, 2); \
::backtrace_symbols_fd(array, caf_bt_size, 2); \
abort();
\
::abort();
\
} static_cast<void>(0)
} static_cast<void>(0)
#endif
#endif
// Convenience macros.
// Convenience macros.
#define CAF_IGNORE_UNUSED(x) static_cast<void>(x)
;
#define CAF_IGNORE_UNUSED(x) static_cast<void>(x)
#define CAF_CRITICAL(error) \
#define CAF_CRITICAL(error) \
do { \
do { \
fprintf(stderr, "[FATAL] %s:%u: critical error: '%s'\n", \
fprintf(stderr, "[FATAL] %s:%u: critical error: '%s'\n", \
__FILE__, __LINE__, error); \
__FILE__, __LINE__, error); \
abort();
\
::abort();
\
} while (false)
} while (false)
#ifdef CAF_NO_EXCEPTIONS
#ifdef CAF_NO_EXCEPTIONS
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment