Opened 9 years ago

Last modified 9 years ago

#9905 new Bugs

Compile error in /libs/utility/assert_test.cpp

Reported by: chris.cooper@… 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 chris.cooper@…, 9 years ago

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.

comment:2 by viboes, 9 years ago

Component: Noneutility
Owner: set to No-Maintainer
Note: See TracTickets for help on using tickets.