Opened 9 years ago
Last modified 9 years ago
#9905 new Bugs
Compile error in /libs/utility/assert_test.cpp
Reported by: | Owned by: | No-Maintainer | |
---|---|---|---|
Milestone: | To Be Determined | Component: | utility |
Version: | Boost 1.54.0 | Severity: | Problem |
Keywords: | Cc: |
Description
Compiling this file using clang++ (from Apple LLVM version 5.1) with c++11 features enabled, fails.
Command line:
"clang++" -x c++ -std=c++11 -stdlib=libc++ -O3 -O3 -finline-functions -Wno-inline -Wall -DBOOST_ALL_NO_LIB=1 -DNDEBUG -I"../../.." -c -o "/tmp/boost/bin.v2/libs/utility/test/assert_test.test/clang-darwin-4.2.1/release/link-static/threading-multi/assert_test.o" "../assert_test.cpp"
Error:
../assert_test.cpp:86:13: error: out-of-line definition of 'assertion_failed_msg' does not match any declaration in namespace 'boost'
Solution:
Replace
void boost::assertion_failed_msg([SNIP]) { [SNIP] }
with
namespace boost {
void assertion_failed_msg([SNIP]) { [SNIP] }
}
Change History (2)
comment:1 by , 9 years ago
comment:2 by , 9 years ago
Component: | None → utility |
---|---|
Owner: | set to |
My bad, I see now that the problem is that assert_test.cpp doesn't work correctly when NDEBUG is defined. The underlying problem is the same as issue #7028 so I think this should be closed as a duplicate.