taken care of BOOST_NO_STDC_NAMESPACE

[SVN r25345]
This commit is contained in:
Joaquín M. López Muñoz 2004-09-22 17:18:06 +00:00
parent 325bd73df7
commit eff2c75bba
2 changed files with 12 additions and 2 deletions

View File

@ -51,13 +51,18 @@ void test_disabled()
#define BOOST_ENABLE_ASSERT_HANDLER
#include <boost/assert.hpp>
#include <boost/config.hpp>
#include <cstdio>
int handler_invoked = 0;
void boost::assertion_failed(char const * expr, char const * function, char const * file, long line)
{
std::printf("Expression: %s\nFunction: %s\nFile: %s\nLine: %ld\n\n", expr, function, file, line);
#if !defined(BOOST_NO_STDC_NAMESPACE)
using std::printf;
#endif
printf("Expression: %s\nFunction: %s\nFile: %s\nLine: %ld\n\n", expr, function, file, line);
++handler_invoked;
}

View File

@ -18,11 +18,16 @@
//
#include <boost/current_function.hpp>
#include <boost/config.hpp>
#include <cstdio>
void message(char const * file, long line, char const * func, char const * msg)
{
std::printf("%s(%ld): %s in function '%s'\n", file, line, msg, func);
#if !defined(BOOST_NO_STDC_NAMESPACE)
using std::printf;
#endif
printf("%s(%ld): %s in function '%s'\n", file, line, msg, func);
}
#define MESSAGE(msg) message(__FILE__, __LINE__, BOOST_CURRENT_FUNCTION, msg)