|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r68054 - branches/release/boost/detail
From: bdawes_at_[hidden]
Date: 2011-01-12 09:57:45
Author: bemandawes
Date: 2011-01-12 09:57:41 EST (Wed, 12 Jan 2011)
New Revision: 68054
URL: http://svn.boost.org/trac/boost/changeset/68054
Log:
Merge from trunk
Added:
branches/release/boost/detail/lightweight_main.hpp
- copied unchanged from r68053, /trunk/boost/detail/lightweight_main.hpp
Properties modified:
branches/release/boost/detail/ (props changed)
Text files modified:
branches/release/boost/detail/lightweight_test.hpp | 20 ++++++++++++++++++++
1 files changed, 20 insertions(+), 0 deletions(-)
Modified: branches/release/boost/detail/lightweight_test.hpp
==============================================================================
--- branches/release/boost/detail/lightweight_test.hpp (original)
+++ branches/release/boost/detail/lightweight_test.hpp 2011-01-12 09:57:41 EST (Wed, 12 Jan 2011)
@@ -24,6 +24,7 @@
//
#include <boost/current_function.hpp>
+#include <boost/assert.hpp>
#include <iostream>
namespace boost
@@ -32,9 +33,26 @@
namespace detail
{
+struct report_errors_reminder
+{
+ bool called_report_errors_function;
+ report_errors_reminder() : called_report_errors_function(false) {}
+ ~report_errors_reminder()
+ {
+ BOOST_ASSERT(called_report_errors_function); // verify report_errors() was called
+ }
+};
+
+inline report_errors_reminder& report_errors_remind()
+{
+ static report_errors_reminder r;
+ return r;
+}
+
inline int & test_errors()
{
static int x = 0;
+ report_errors_remind();
return x;
}
@@ -68,6 +86,8 @@
inline int report_errors()
{
+ detail::report_errors_remind().called_report_errors_function = true;
+
int errors = detail::test_errors();
if( errors == 0 )
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk