mirror of
https://github.com/boostorg/utility.git
synced 2025-05-08 18:34:02 +00:00
taken care of BOOST_NO_STDC_NAMESPACE
[SVN r25345]
This commit is contained in:
parent
325bd73df7
commit
eff2c75bba
@ -51,13 +51,18 @@ void test_disabled()
|
|||||||
|
|
||||||
#define BOOST_ENABLE_ASSERT_HANDLER
|
#define BOOST_ENABLE_ASSERT_HANDLER
|
||||||
#include <boost/assert.hpp>
|
#include <boost/assert.hpp>
|
||||||
|
#include <boost/config.hpp>
|
||||||
#include <cstdio>
|
#include <cstdio>
|
||||||
|
|
||||||
int handler_invoked = 0;
|
int handler_invoked = 0;
|
||||||
|
|
||||||
void boost::assertion_failed(char const * expr, char const * function, char const * file, long line)
|
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;
|
++handler_invoked;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -18,11 +18,16 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
#include <boost/current_function.hpp>
|
#include <boost/current_function.hpp>
|
||||||
|
#include <boost/config.hpp>
|
||||||
#include <cstdio>
|
#include <cstdio>
|
||||||
|
|
||||||
void message(char const * file, long line, char const * func, char const * msg)
|
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)
|
#define MESSAGE(msg) message(__FILE__, __LINE__, BOOST_CURRENT_FUNCTION, msg)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user