Commit b0ad0eb1 authored by Diane Bury's avatar Diane Bury
Browse files

Add explicit bool cast for C++11, fix #16

Add explicit cast in the definition of HPP_ASSERT because C++11 does not
accept implicit conversion from shared_ptr to bool.
parent 46c057ea
......@@ -33,7 +33,7 @@ namespace hpp
# ifdef HPP_ENABLE_ASSERTIONS
# define HPP_ASSERT(CONDITION) \
do { \
bool _x = (CONDITION); \
bool _x = static_cast<bool>(CONDITION); \
if (!_x) \
HPP_THROW_EXCEPTION \
(::hpp::AssertionError, \
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment